Bug 247239 - rpm-q --last produces strange output on non-existent packages
rpm-q --last produces strange output on non-existent packages
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
9
All Linux
low Severity low
: ---
: ---
Assigned To: Panu Matilainen
Fedora Extras Quality Assurance
bzcl34nup
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-06 04:35 EDT by Peter Bieringer
Modified: 2009-02-05 08:43 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-02-05 08:43:28 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Peter Bieringer 2007-07-06 04:35:28 EDT
Description of problem:
rpm-q --last produces strange output on non-existent packages

Version-Release number of selected component (if applicable):
rpm-4.4.2-33.fc6

How reproducible:
Always

Steps to Reproduce:
1. $ LANG=C rpm -q --last kernel kernel-smp
(on a system missing kernel-smp package)
  
Actual results:
kernel-2.6.20-1.2962.fc6                      Tue Jun 26 10:51:05 2007
kernel-2.6.20-1.2952.fc6                      Thu May 31 10:44:34 2007
package                                       kernel-smp is not installed


Expected results:
Improved one.

Additional info:
I don't know whether this is by design or a mistake, anyway, such output needs a
more intelligent parser...
Comment 1 Peter Bieringer 2007-07-06 04:36:28 EDT
BTW: the German version looks more strange, too:

$ rpm -q --last kernel kernel-smp | grep -wv ^package
kernel-2.6.20-1.2962.fc6                      Di 26 Jun 2007 10:51:05 CEST
kernel-2.6.20-1.2952.fc6                      Do 31 Mai 2007 10:44:34 CEST
Das                                           Paket kernel-smp ist nicht installiert
Comment 2 Peter Bieringer 2007-07-06 04:50:00 EDT
I even don't know whether following use of option should result in:

$ LANG=C rpm -q --queryformat "%{name}-%{version}-%{release} %{installtime}\n"
--last kernel kernel-smp
kernel-2.6.20-1.2962.fc6                      Tue Jun 26 10:51:05 2007
kernel-2.6.20-1.2952.fc6                      Thu May 31 10:44:34 2007
package                                       kernel-smp is not installed
kernel-2.6.20-1.2962.fc6                      1182847865
kernel-2.6.20-1.2952.fc6                      1180601074

$ LANG=de_DE rpm -q --queryformat "%{name}-%{version}-%{release}
%{installtime}\n" --last kernel kernel-smp
kernel-2.6.20-1.2962.fc6                      Di 26 Jun 2007 10:51:05 CEST
kernel-2.6.20-1.2952.fc6                      Do 31 Mai 2007 10:44:34 CEST
kernel-2.6.20-1.2962.fc6                      1182847865
kernel-2.6.20-1.2952.fc6                      1180601074
Das                                           Paket kernel-smp ist nicht installiert
Comment 3 Jeff Johnson 2007-07-06 07:24:09 EDT
The --last option is intended to be used as
    rpm -qa --last
not as you are using.

Try
    rpm -qa --last | grep kernel
instead.
Comment 4 Panu Matilainen 2007-08-10 06:32:23 EDT
One point worth noting here is that the "package not installed" error message
goes to stdout. If it went to stderr instead (like it probably should), it'd be
nicer to filter out in the popt alias...

Not going to fix for FC6 (and intented usage described in c#3) but moving to
devel as a reminder for self regarding stdout/stderr behavior.
Comment 5 Bug Zapper 2008-04-04 09:21:27 EDT
Based on the date this bug was created, it appears to have been reported
during the development of Fedora 8. In order to refocus our efforts as
a project we are changing the version of this bug to '8'.

If this bug still exists in rawhide, please change the version back to
rawhide.
(If you're unable to change the bug's version, add a comment to the bug
and someone will change it for you.)

Thanks for your help and we apologize for the interruption.

The process we're following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.
Comment 6 Peter Bieringer 2008-04-04 17:13:31 EDT
Still happen in rpm-4.4.2.2-7.fc8
Comment 7 Bug Zapper 2008-11-26 02:33:39 EST
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '8'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 8 Peter Bieringer 2008-12-02 02:04:55 EST
Still existing at least in F9

$ LC_ALL=C rpm -q --last kernel kernel-smp
kernel-2.6.27.5-41.fc9                        Wed Nov 19 23:24:58 2008
kernel-2.6.27.5-37.fc9                        Sun Nov 16 09:40:38 2008
package                                       kernel-smp is not installed
$ rpm -q rpm
rpm-4.4.2.3-2.fc9.i386
Comment 9 Panu Matilainen 2009-02-05 08:43:28 EST
Not going to get fixed for F9 or F10 either for that matter, changing the stdout/stderr behavior of rpm would break loads of existing scripts so this is not something that can be fixed "just like that".

Moving this to upstream tracking: http://rpm.org/ticket/31

Note You need to log in before you can comment on or make changes to this bug.