FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 11-15-2011, 10:48 PM
"Phoenix, Merka"
 
Default 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@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}"
'
> | 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



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-16-2011, 01:33 PM
"Denniston, Todd A CIV NAVSURFWARCENDIV Crane"
 
Default How can rpm "%{SUMMARY}" not be consistent?

> -----Original Message-----
> From: centos-bounces@centos.org [mailto:centos-bounces@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@centos.org
> > Subject: [CentOS] How can rpm "%{SUMMARY}" not be consistent?
> >
<SNIP>
> > rpm -qa
> > --qf
> > '"%{VENDOR}","%{NAME}","%{VERSION}","%{VERSION}-
> %{RELEASE}","%{ARCH}","%{SUMMARY}"
'
> > | 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.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-16-2011, 01:48 PM
Akemi Yagi
 
Default How can rpm "%{SUMMARY}" not be consistent?

On Tue, Nov 15, 2011 at 12:56 PM, Denniston, Todd A CIV
NAVSURFWARCENDIV Crane <todd.denniston@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}"
'
> *| 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
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-16-2011, 01:56 PM
John Hodrien
 
Default How can rpm "%{SUMMARY}" not be consistent?

On Wed, 16 Nov 2011, Akemi Yagi wrote:

> 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 ?

Why would yum cache have any bearing on what rpm reported?

jh
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-16-2011, 03:19 PM
Akemi Yagi
 
Default How can rpm "%{SUMMARY}" not be consistent?

On Wed, Nov 16, 2011 at 6:56 AM, John Hodrien <J.H.Hodrien@leeds.ac.uk> wrote:
> On Wed, 16 Nov 2011, Akemi Yagi wrote:
>
>> 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 ?
>
> Why would yum cache have any bearing on what rpm reported?

In my attempts to reproduce what you are seeing, I used 'yum info' a
few times for the packages that were not on my systems. But in your
case (pure rpm operations) yum cache will not be relevant. By the way
I looked at both CentOS 5 and 6 but did not see any inconsistency. And
the reason why I asked about the kernel version was because it was not
clear which version/release of CentOS you are running. Sorry for the
noise. I will shut up now.

Akemi
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-16-2011, 08:37 PM
"Denniston, Todd A CIV NAVSURFWARCENDIV Crane"
 
Default How can rpm "%{SUMMARY}" not be consistent?

> -----Original Message-----
> From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On
> Behalf Of Akemi Yagi
> Sent: Wednesday, November 16, 2011 11:20
> To: CentOS mailing list
> Subject: Re: [CentOS] How can rpm "%{SUMMARY}" not be consistent?
>
> On Wed, Nov 16, 2011 at 6:56 AM, John Hodrien
<J.H.Hodrien@leeds.ac.uk>
> wrote:
> > On Wed, 16 Nov 2011, Akemi Yagi wrote:
> >
> >> 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?

I would have said you also seeing 'version 3.1.' is one of the very odd
things, but then I check the bash rpm in a repo and it has 'version
3.1.' in the 3.2-32.el5 rpm.

> >> uname -mr ?
> >>
> >> Have you cleared yum cache? Not just running a 'yum clean all' but
> >> emptying the /var/cache/yum directory ?
> >
> > Why would yum cache have any bearing on what rpm reported?
>
> In my attempts to reproduce what you are seeing, I used 'yum info' a

It takes days/weeks of collecting the data via cron.daily and (I think)
having a few updates/installs happen between some of the runs.
On the boxes where I see it more, I often run the data collection script
immediately following updates. I almost think there is some kind of rpm
housekeeping that gets done on a daily basis that could affect it, but I
can't figure out what it would be, because the rpm script in cron.daily
only dumps data (similar to what mine dumps) to /var/log/rpmpkgs... it
does not issue any rpm clean up commands. as I understand anacron, each
of the scripts should finish before anacron starts the next, so there
should not be any DB contention, between the rpm script and mine, I
would think.

At one time (in the mists of history, probably around RHEL 1|2) I
thought there was a daily rpm cleanup task, but I can't find it on Cent
5 systems.

> few times for the packages that were not on my systems. But in your
> case (pure rpm operations) yum cache will not be relevant.

That is my thought too.
But I don't know where rpm could be getting the different info.

> By the way
> I looked at both CentOS 5 and 6 but did not see any inconsistency.

I am on CentOS 5.

> And
> the reason why I asked about the kernel version was because it was not
> clear which version/release of CentOS you are running. Sorry for the
> noise. I will shut up now.
>


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-16-2011, 09:20 PM
Nicolas Thierry-Mieg
 
Default How can rpm "%{SUMMARY}" not be consistent?

Denniston, Todd A CIV NAVSURFWARCENDIV Crane wrote:
>
> At one time (in the mists of history, probably around RHEL 1|2) I
> thought there was a daily rpm cleanup task, but I can't find it on Cent
> 5 systems.

there is something in /etc/rc.sysinit, so it would happen on reboot:
$ grep rpm /etc/rc.sysinit
rm -f /var/lib/rpm/__db* &> /dev/null
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-29-2011, 02:53 PM
"Denniston, Todd A CIV NAVSURFWARCENDIV Crane"
 
Default How can rpm "%{SUMMARY}" not be consistent?

> -----Original Message-----
> From: Denniston, Todd A CIV NAVSURFWARCENDIV Crane
> Sent: Wednesday, November 16, 2011 16:37
> To: CentOS mailing list
> Subject: RE: [CentOS] How can rpm "%{SUMMARY}" not be consistent?
> > -----Original Message-----
> > From: centos-bounces@centos.org [mailto:centos-bounces@centos.org]
On
> > Behalf Of Akemi Yagi
> > Sent: Wednesday, November 16, 2011 11:20
> > To: CentOS mailing list
> > Subject: Re: [CentOS] How can rpm "%{SUMMARY}" not be consistent?
> >
> > On Wed, Nov 16, 2011 at 6:56 AM, John Hodrien
> <J.H.Hodrien@leeds.ac.uk>
> > wrote:
> > > On Wed, 16 Nov 2011, Akemi Yagi wrote:
> > >
> > >> What you are seeing is indeed odd. I see 'version 3.1' but not
'3.2'
> > >> anywhere on the Summary line of bash.
>
> I would have said you also seeing 'version 3.1.' is one of the very
odd
> things, but then I check the bash rpm in a repo and it has 'version
> 3.1.' in the 3.2-32.el5 rpm.
>

I think I know some of what is causing what is going on now...
After a little testing with a format string of

'"%{VENDOR}","%{NAME}","%{VERSION}","%{VERSION}-%{RELEASE}","%{ARCH}","%
{INSTALLTIME:date}"
'
I found I got different results based on the LANG environment setting,
which led me to try it with the SUMMARY field too.

###start with a normally configured terminal
$ cd /to/your/CentOS/mirror/
$ locale |grep LANG
LANG=en_US.UTF-8
$ rpm -q
--qf
'"%{VENDOR}","%{NAME}","%{VERSION}","%{VERSION}-%{RELEASE}","%{ARCH}","%
{SUMMARY}"
'
-p 5.7/os/i386/CentOS/bash-3.2-32.el5.i386.rpm
"CentOS","bash","3.2","3.2-32.el5","i386","The GNU Bourne Again shell
(bash) version 3.1."

#now change LANG to what I see from cron
$ export LANG=
$ locale |grep LANG
LANG=
$ rpm -q
--qf
'"%{VENDOR}","%{NAME}","%{VERSION}","%{VERSION}-%{RELEASE}","%{ARCH}","%
{SUMMARY}"
'
-p 5.7/os/i386/CentOS/bash-3.2-32.el5.i386.rpm
"CentOS","bash","3.2","3.2-32.el5","i386","The GNU Bourne Again shell
(bash) version 3.2"

Why does a number in a text string change based on LANG?

####and for added fun... look at an agg package from epel
$ export LANG=en_US.UTF-8
$ rpm -q --qf
'"%{VENDOR}","%{NAME}","%{VERSION}","%{VERSION}-%{RELEASE}","%{ARCH}","%
{SUMMARY}"
' agg
"Fedora Project","agg","2.5","2.5-9.el5","i386","Anti-Grain Geometry"
$ export LANG=
$ rpm -q --qf
'"%{VENDOR}","%{NAME}","%{VERSION}","%{VERSION}-%{RELEASE}","%{ARCH}","%
{SUMMARY}"
' agg
"Fedora Project","agg","2.5","2.5-9.el5","i386","Anti-Grain Geometry
graphical rendering engine"

Why does the string length change this dramatically based on LANG?


Well I guess I at least know what I need to do to the script to have it
be consistent.

I might even get around to filing a RH bug, because this does not seem
to me to be a correct behavior to me. does anyone here see these changes
as correct behavior (and why)?

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-29-2011, 03:07 PM
"Denniston, Todd A CIV NAVSURFWARCENDIV Crane"
 
Default How can rpm "%{SUMMARY}" not be consistent?

> -----Original Message-----
> From: Denniston, Todd A CIV NAVSURFWARCENDIV Crane
> Sent: Tuesday, November 29, 2011 10:54
> To: 'CentOS mailing list'
> Subject: RE: [CentOS] How can rpm "%{SUMMARY}" not be consistent?
>
> ####and for added fun... look at an agg package from epel
> $ export LANG=en_US.UTF-8
> $ rpm -q --qf '"%{VENDOR}","%{NAME}","%{VERSION}","%{VERSION}-
> %{RELEASE}","%{ARCH}","%{SUMMARY}"
' agg
> "Fedora Project","agg","2.5","2.5-9.el5","i386","Anti-Grain Geometry"
> $ export LANG=
> $ rpm -q --qf '"%{VENDOR}","%{NAME}","%{VERSION}","%{VERSION}-
> %{RELEASE}","%{ARCH}","%{SUMMARY}"
' agg
> "Fedora Project","agg","2.5","2.5-9.el5","i386","Anti-Grain Geometry
> graphical rendering engine"
>
> Why does the string length change this dramatically based on LANG?

###And even more fun... try compat-db
$export LANG= ;rpm -q --qf
'"%{VENDOR}","%{NAME}","%{VERSION}","%{VERSION}-%{RELEASE}","%{ARCH}","%
{SUMMARY}"
' compat-db
"CentOS","compat-db","4.2.52","4.2.52-5.1","i386","The Berkeley DB
database library for Red Hat Linux 7.x compatibility."
$ export LANG=en_US.UTF-8 ;rpm -q --qf
'"%{VENDOR}","%{NAME}","%{VERSION}","%{VERSION}-%{RELEASE}","%{ARCH}","%
{SUMMARY}"
' compat-db
"CentOS","compat-db","4.2.52","4.2.52-5.1","i386","The Berkeley DB
database library for CentOS 2.1 compatibility."

Yep that seems a strange one.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-29-2011, 03:44 PM
Bart Schaefer
 
Default How can rpm "%{SUMMARY}" not be consistent?

On Tue, Nov 29, 2011 at 7:53 AM, Denniston, Todd A CIV
NAVSURFWARCENDIV Crane <todd.denniston@navy.mil> wrote:
>
> Why does a number in a text string change based on LANG?

There's a separate dictionary of translated text strings (called a
catalog) for each language. Those translations are looked up and
substituted for the default text based on the locale or language
settings in the environment. If the number is stored in the catalog
as part of the string, you could see this effect.

It appears that either the catalogs have not been updated along with
the packages that make reference to them (which would be a bug), or
the updated catalogs have not been installed because they are part of
a "language pack" that is not listed as a dependency of all the
packages that refer to it (which likely is a deliberate optimization).
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 06:58 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org