> -----Original Message----- > From: centos-bounces at centos.org [mailto:centos-bounces at centos.org] On > Behalf Of Phoenix, Merka > Sent: Tuesday, November 15, 2011 18:48 > To: CentOS mailing list > Subject: Re: [CentOS] How can rpm "%{SUMMARY}" not be consistent? > > -----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? > > <SNIP> > > 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. Although you may be correct on the need to sort the NAME field using -k4 instead of -k3 ***, the question was not about the sort order, but about the *content* of the SUMMARY fields being different between multiple runs against the same database information for the same package, i.e. notice the difference in the summary fields for the same bash package above. *** and this seems to explain a different but MUCH less annoying confusion. Thanks for that bit of help.