Re: How can rpm "%{SUMMARY}" not be consistent?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



> -----Original Message-----
> From: Denniston, Todd A CIV NAVSURFWARCENDIV Crane
> Sent: Wednesday, November 16, 2011 16:37
> To: CentOS mailing list
> Subject: RE:  How can rpm "%{SUMMARY}" not be consistent?
> > -----Original Message-----
> > From: centos-bounces@xxxxxxxxxx [mailto:centos-bounces@xxxxxxxxxx]
On
> > Behalf Of Akemi Yagi
> > Sent: Wednesday, November 16, 2011 11:20
> > To: CentOS mailing list
> > Subject: Re:  How can rpm "%{SUMMARY}" not be consistent?
> >
> > On Wed, Nov 16, 2011 at 6:56 AM, John Hodrien
> <J.H.Hodrien@xxxxxxxxxxx>
> > 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}"\n'
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}"\n'  \
  -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}"\n'  \
  -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}"\n' 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}"\n' 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@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux