rpm --qf / nonsense

Jeffrey Johnson n3npq at me.com
Thu Sep 18 18:16:21 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:
> 
> 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?!
> 


Reproduced with rpm-4.8.0 on CentOS6/x86_64:

# rpm -q rpm  --qf '%{N}\n'
rpm
# rpm -q rpm  --qf '/usr/share/doc/%{N}\n'
/usr/share/doc/rpm
# rpm -q rpm  --qf '/%{N}\n'
/rpm
# rpm -q rpm  --qf 'lol%{N}\n'
lolrpm
# rpm --version
RPM version 4.8.0

What version of rpm are you using?

73 de Jeff


More information about the pld-devel-en mailing list