Bug 721106

Summary: changelog queries prefer older co-installed packages
Product: [Fedora] Fedora Reporter: Garrett Holmstrom <gholms>
Component: rpmAssignee: Panu Matilainen <pmatilai>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 14CC: ffesti, jnovy, pmatilai
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-19 08:50:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Garrett Holmstrom 2011-07-13 18:24:24 UTC
Description of problem:
When ``rpm -q --changelog'' is called for a package that has more than one version installed, the resulting changelog seems to be that of the oldest version rather than the newest, where "oldest" means either "least recently installed" or "oldest e-v-r".  (I am not sure which, but I could find out if you wish.)

Version-Release number of selected component (if applicable):
rpm-4.8.1-5.fc14.x86_64

How reproducible:
When multiple kernels are installed

Steps to Reproduce:
1. rpm -q kernel
2. rpm -q kernel --changelog | head -n 1
  
Actual results:
kernel-2.6.35.12-90.fc14.x86_64
kernel-2.6.35.13-91.fc14.x86_64
kernel-2.6.35.13-92.fc14.x86_64
* Fri Apr 22 2011 Kyle McMartin <kmcmartin> 2.6.35.12-90

Expected results:
kernel-2.6.35.12-90.fc14.x86_64
kernel-2.6.35.13-91.fc14.x86_64
kernel-2.6.35.13-92.fc14.x86_64
* Fri May 20 2011 Chuck Ebbert <cebbert> 2.6.35.13-92

Comment 1 Panu Matilainen 2011-07-19 08:50:58 UTC
Just like 'rpm -q kernel' returns all the installed kernel versions, 'rpm -q --changelog kernel' returns changelogs of all installed kernels, in whatever order they happen to be encountered in the rpmdb, which typically means oldest first. No bug here - if you want the changelog of a specific version, you need to specify the version, eg 'rpm -q --changelog kernel-2.6.35.13-92.fc14.x86_64'