RPM query results?

Kurt Granroth kurt+plug-discuss at granroth.com
Sat Mar 20 23:27:30 MST 2010


On 3/20/10 11:56 AM, Matt Graham wrote:
> After a long battle with technology, Kurt Granroth wrote:
>> rpm -q --queryformat "%{name}\n" --specfile project.spec
>> I run this on three CentOS 5 systems.  Two are x86_64 and one is i386.
>> I don't know for sure that all three systems are running the same point
>> version of CentOS5
>
>> Remote x86_64 system:
>> project132-1.3.2-%{dist}
>> project132
>
>> Local i386 system:
>> project132
>> project132-debuginfo
>
>> It's the *same* spec file on all three!  So what is causing them to give
>> different results?  In particular, why does one give a -debuginfo
>> version and the other a '-%{dist}' version?
>
>> I can provide the actual spec file in question, but not immediately.
>> I'm hoping, at this point, that somebody will just *know* the answer.
>
> The version# thing is a bit odd.  My first guess would be that the packages
> were built with *slightly* different spec files, actually.  None of the RPMs
> I've built do this though.  However, I'm very serious about ++ing the last
> version number in the release every time I change the spec file and rebuild
> the RPM.

I'm well before the step of actually having a package.  We're just 
talking about the bare spec file at this stage.

Okay, so here is some more testing.  I've attached a minimal spec file 
(minimal.spec) to illustrate what I'm seeing.  I ran the following query 
on it:

rpm -q --specfile minimal.spec

I then captured the results of that plus the version of 'rpm', the 
installed distro, and uname for a few distros.  Here's what I got:

------------------------------------
CentOS release 5 (Final)
  minimal-1.0-1
  minimal-debuginfo-1.0-1
RPM version 4.4.2.3
Linux 2.6.18-53.el5 #1 SMP i686 i686 i386 GNU/Linux

CentOS release 5.4 (Final)
  minimal-1.0-1
RPM version 4.4.2.3
Linux 2.6.18-164.el5 #1 SMP x86_64 x86_64 x86_64 GNU/Linux

Fedora release 12 (Constantine)
  minimal-1.0-1.i686
  minimal-debuginfo-1.0-1.i686
RPM version 4.7.2
Linux 2.6.32.9-67.fc12.i686 #1 SMP i686 i686 i386 GNU/Linux

openSUSE 11.2 (i586)
  minimal-1.0-1.i586
RPM version 4.7.1
Linux 2.6.31.5-0.1-desktop #1 SMP PREEMPT i686 i686 i386 GNU/Linux
------------------------------------

My first thought was the version of rpm... but both the oldest version 
(CentOS5) and the newest version (Fedora12) both had the -debuginfo 
result.  Maybe it's i686 vs x86_64 since the one x86_64 system had the 
"right" result... except that openSUSE at i586 did as well.

This leads me to believe that there is something installed on the system 
that tells rpm to print out the -debuginfo variant.  But what?

BTW, the *reason* for this is that I am writing a script that parses the 
spec file and exacts specifics magics upon it... but the non-standard 
responses are throwing me for a curve.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: minimal.spec
URL: <http://lists.PLUG.phoenix.az.us/pipermail/plug-discuss/attachments/20100320/e34e72c6/attachment.txt>


More information about the PLUG-discuss mailing list