Description of problem: --qf is ignored when used with --last The man page states: --last Orders the package listing by install time such that the latest packages are at the top. Version-Release number of selected component (if applicable): rpm-4.11.0.1-1.fc19.x86_64 rpm-4.9.1.3-8.fc17.x86_64 How reproducible: Every time Steps to Reproduce: 1. rpm -q kernel --last --qf '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' 2. 3. Actual results: kernel-3.8.11-100.fc17 Sat 04 May 2013 08:04:14 CEST kernel-3.8.8-100.fc17 Tue 30 Apr 2013 13:25:29 CEST kernel-3.8.4-102.fc17 Sun 31 Mar 2013 08:31:52 CEST kernel-3.8.8-100.fc17.x86_64 kernel-3.8.4-102.fc17.x86_64 kernel-3.8.11-100.fc17.x86_64 Expected results: kernel-3.8.8-100.fc17.x86_64 kernel-3.8.4-102.fc17.x86_64 kernel-3.8.11-100.fc17.x86_64 Additional info:
--qf is not exactly ignored, its appended... but that's unlikely to be what you expect either. The issue is that --last is implemented as a popt alias and it relies on a very specific --qf of its own to get its job done: rpm alias --last --qf '%|INSTALLTIME?{%{INSTALLTIME}}:{000000000}| %{NVRA} %|INSTALLTIME?{%{INSTALLTIME:date}}:{(not installed)}|\n' \ --pipe "sort -r -n | sed 's,^[0-9]\+ ,,' | awk '{printf(\"%-45s %-s\n\", $1, substr($0,length($1)+2))}' " \ --POPTdesc=$"list package(s) by install time, most recent first" This is one of the reasons for 'rpm --help' showing the popt aliases in a section of their own: such aliases cannot be freely combined with other options.