rpm --qf / nonsense

Jeffrey Johnson n3npq at me.com
Thu Sep 18 18:39:03 CEST 2014


On Sep 18, 2014, at 11:48 AM, Elan Ruusamäe wrote:

> rpm --qf gives out nonsense (ignores arg completely?) if --qf format starts with a slash:
> 


Those commands are not POISXly correct:

	You have --qf options after the argument "rpm".

Rearrange the CLI invocation:

$ rpm -q --qf '/%{N}\n' rpm
/rpm
$ rpm -q --qf '%{N}\n' rpm
rpm
[$ rpm -q --qf '/usr/share/doc/%{N}\n' rpm
/usr/share/doc/rpm
$ rpm -q --qf '/%{N}\n' rpm
/rpm
$ rpm -q --qf 'lol%{N}\n' rpm
lolrpm

I'll look at a better fix in popt with aliases in a moment. Don't
expect a patch however.

hth

73 de Jeff

> see transcript below:
> $ rpm -q rpm  --qf '%{N}\n'
> rpm
> $ rpm -q rpm  --qf '/usr/share/doc/%{N}\n'
> rpm-5.4.14-5.x86_64
> $ rpm -q rpm  --qf '/%{N}\n'
> rpm-5.4.14-5.x86_64
> $ rpm -q rpm  --qf 'lol%{N}\n'
> lolrpm
> 
> so... wtf?!
> 
> -- 
> glen
> 
> _______________________________________________
> pld-devel-en mailing list
> pld-devel-en at lists.pld-linux.org
> http://lists.pld-linux.org/mailman/listinfo/pld-devel-en



More information about the pld-devel-en mailing list