About rpm --querytags option
Michael Schwendt
mschwendt at gmail.com
Mon Jan 7 14:19:56 UTC 2008
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.
More information about the users
mailing list