About rpm --querytags option
Robert Wuest
rwuestfc at wuest.org
Mon Jan 7 14:34:31 UTC 2008
This brings to mind a problem I had to deal with not too long ago.
How does one find the spec file a package is built from?
Is there a more reliable / faster way than something like this?
rpm -qlp package.src.rpm | egrep '\.spec$'
Robert
On Mon, 7 Jan 2008, Michael Schwendt wrote:
> On 07/01/2008, jeanpca at free.fr <jeanpca at free.fr> wrote:
>>
>> Hello
>>
>> I use the rpm command to manipulate rpm file and to identify them,
>> by name, by version, by release, by arch..
>>
>> I am in trouble with the tags SOURCE and SOURCERPM wich are listed
>> by the rpm command when I type : rpm --querytags
>>
>> I read
>> http://www.rpm.org/max-rpm/ch-queryformat-tags.html but
>> didn't find answer to my question :
>>
>> when I type: rpm -qp --qf "%{source}\n"
>> /tmp/my_binary_rpm.i386.rpm
>>
>> I can see : (none)
>
> The query is bad. %{source} is an array and holds the values of the
> src.rpm spec file's primary SourceX tags. Use query "[%{source} ]"
> instead to retrieve all values.
>
>> and when I type : rpm -qp --qf "%{sourcerpm}\n"
>> /tmp/my_binary_rpm.i386.rpm
>>
>> I can see the name of the source which has been used to produce
>> this binary rpm
>>
>> so when I see "(none)", is it sufficient to say that the rpm file
>> is a binary rpm ?
>
> I don't understand why you want to mix the two values. A binary rpm
> that was built from a source rpm returns a value in %{sourcerpm}. A
> source rpm returns "(none)" in %{sourcerpm} because it is built from a
> spec file, not from a src.rpm.
>
> --
> fedora-list mailing list
> fedora-list at redhat.com
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
>
More information about the fedora-list
mailing list