Denniston, Todd A CIV NAVSURFWARCENDIV Crane
2011-Nov-15 20:56 UTC
[CentOS] How can rpm "%{SUMMARY}" not be consistent?
I have been seeing something for quite some time which has confused me considerably for over a year, perhaps one of you can help me understand. Assumed: rpm queries are against _a_ database. Assumed: database queries against the same database, without changes to the data in the database, will return the same data. Confusion: then why are some of the summaries reported by rpm different? Each day I (cron.daily) run the following command rpm -qa \ --qf '"%{VENDOR}","%{NAME}","%{VERSION}","%{VERSION}-%{RELEASE}","%{ARCH}","% {SUMMARY}"\n' \ | sort -t\" -k3 > ${OUTFILE} Stuff the resulting ${OUTFILE} in an rcs file. And some days the rcs file will show deltas such as the following (which was pulled from a rather recent set of flipflops): --- mach.csv 2011/11/15 10:50:04 +++ mach.csv 2011/11/15 09:22:53 -"CentOS","bash","3.2","3.2-32.el5","i386","The GNU Bourne Again shell (bash) version 3.1." +"CentOS","bash","3.2","3.2-32.el5","i386","The GNU Bourne Again shell (bash) version 3.2" -"CentOS","compat-db","4.2.52","4.2.52-5.1","i386","The Berkeley DB database library for CentOS 2.1 compatibility." +"CentOS","compat-db","4.2.52","4.2.52-5.1","i386","The Berkeley DB database library for Red Hat Linux 7.x compatibility." -"CentOS","firefox","3.6.24","3.6.24-3.el5.centos","i386","Mozilla Firefox Web browser." +"CentOS","firefox","3.6.24","3.6.24-3.el5.centos","i386","Mozilla Firefox Web browser" -"Adobe Systems Inc.","flash-plugin","11.1.102.55","11.1.102.55-release","i386","Adobe Flash Player 7.0" +"Adobe Systems Inc.","flash-plugin","11.1.102.55","11.1.102.55-release","i386","Adobe Flash Player 11.1" -"CentOS","gdb","7.0.1","7.0.1-37.el5_7.1","i386","A GNU source-level debugger for C, C++, Java and other languages." +"CentOS","gdb","7.0.1","7.0.1-37.el5_7.1","i386","A GNU source-level debugger for C, C++, Java and other languages" -"CentOS","gettext","0.17","0.17-1.el5","i386","GNU libraries and utilities for producing multi-lingual messages." +"CentOS","gettext","0.17","0.17-1.el5","i386","GNU libraries and utilities for producing multi-lingual messages" -"CentOS","htmlview","4.0.0","4.0.0-2.el5","noarch","Tools for launching Preferred Applications" +"CentOS","htmlview","4.0.0","4.0.0-2.el5","noarch","Launcher of Preferred Web Browser" rpm -q --last compat-db htmlview compat-db-4.2.52-5.1 Tue 17 Mar 2009 02:32:59 PM EDT htmlview-4.0.0-2.el5 Tue 17 Mar 2009 02:21:59 PM EDT i.e. these have been there, at this version, since machine install. poking around in /var/lib/rpm/, with strings and grep, the only file I find "Adobe Flash Player " in is Packages and I only find the "Adobe Flash Player 11.1" variant of the string. Yet at the same time rpm -q \ --qf '"%{VENDOR}","%{NAME}","%{VERSION}","%{VERSION}-%{RELEASE}","%{ARCH}","% {SUMMARY}"\n' \ flash-plugin displays: "Adobe Systems Inc.","flash-plugin","11.1.102.55","11.1.102.55-release","i386","Adobe Flash Player 7.0" /var/tmp/rpm* is nonexistent. Note: rpm does seem to be fairly consistent in its inconsistency, the above applications are a small sampling of a larger *set* (out of ~180 packages that show this) that seems to keep flip flopping from one SUMMARY to the other, *usually* in the day or two post a yum update (not sure if reboots also affect it). The summaries always bounce between the same text, i.e., htmlview has always used either "Launcher of Preferred Web Browser" or "Tools for launching Preferred Applications" and bash has always used either "The GNU Bourne Again shell (bash) version 3.1." or "The GNU Bourne Again shell (bash) version 3.2" (and a 3.1 version has never been installed on the system). RHEL machines show the same flip flops with the same packages and same flopping summary texts. So where is rpm getting the bad information from????? Can it be cleaned out? What would be lost by cleaning it out?
-----Original Message-----> Denniston, Todd A CIV NAVSURFWARCENDIV Crane wrote: > Sent: Tuesday, 15 November, 2011 12:57 > To: CentOS at centos.org > Subject: [CentOS] How can rpm "%{SUMMARY}" not be consistent? > > I have been seeing something for quite some time which has confused me > considerably for over a year, perhaps one of you can help me understand. > > Assumed: rpm queries are against _a_ database. > Assumed: database queries against the same database, without changes to > the data in the database, will return the same data. > > Confusion: then why are some of the summaries reported by rpm different? > > Each day I (cron.daily) run the following command > rpm -qa \ > --qf > '"%{VENDOR}","%{NAME}","%{VERSION}","%{VERSION}-%{RELEASE}","%{ARCH}","%{SUMMARY}"\n' \ > | sort -t\" -k3 > ${OUTFILE} > > Stuff the resulting ${OUTFILE} in an rcs file. > > And some days the rcs file will show deltas such as the following (which > was pulled from a rather recent set of flipflops): > > --- mach.csv 2011/11/15 10:50:04 > +++ mach.csv 2011/11/15 09:22:53 > > -"CentOS","bash","3.2","3.2-32.el5","i386","The GNU Bourne Again shell > (bash) version 3.1." > +"CentOS","bash","3.2","3.2-32.el5","i386","The GNU Bourne Again shell > (bash) version 3.2"<snip> Using the double quote (") as a delimiter, the third key would be a comma (,) (see below for an example) "A","B","C","D","E",... 1"2"3"4"5"6"7"8"9"A"B... And since your sort command is sorting only on the fifth key, all the commas are already in order (unless there is a blank line in there somewhere). The order of the re cords within a sorted group may or may not be guaranteed to change. Change your sort order from '-k3' to '-k2 -k4 -k6 -k8 -k10 -k12' to sort by Vendor, Name, Version, Version-Release, Arch, Summary and see if that helps. Cheers! Simba Engineering
On Tue, Nov 15, 2011 at 12:56 PM, Denniston, Todd A CIV NAVSURFWARCENDIV Crane <todd.denniston at navy.mil> wrote:> I have been seeing something for quite some time which has confused me > considerably for over a year, perhaps one of you can help me understand. > > Assumed: rpm queries are against _a_ database. > Assumed: database queries against the same database, without changes to > the data in the database, will return the same data. > > Confusion: then why are some of the summaries reported by rpm different? > > Each day I (cron.daily) run the following command > rpm -qa \ > ? ? --qf > '"%{VENDOR}","%{NAME}","%{VERSION}","%{VERSION}-%{RELEASE}","%{ARCH}","% > {SUMMARY}"\n' \ > ?| sort -t\" -k3 > ${OUTFILE} > > Stuff the resulting ${OUTFILE} in an rcs file. > > And some days the rcs file will show deltas such as the following (which > was pulled from a rather recent set of flipflops): > > --- mach.csv ? ?2011/11/15 10:50:04 > +++ mach.csv ? ?2011/11/15 09:22:53 > > -"CentOS","bash","3.2","3.2-32.el5","i386","The GNU Bourne Again shell > (bash) version 3.1." > +"CentOS","bash","3.2","3.2-32.el5","i386","The GNU Bourne Again shell > (bash) version 3.2"What you are seeing is indeed odd. I see 'version 3.1' but not '3.2' anywhere on the Summary line of bash. What is your kernel by the way? uname -mr ? Have you cleared yum cache? Not just running a 'yum clean all' but emptying the /var/cache/yum directory ? Akemi