rpmspec provides not showing package itself

Panu Matilainen pmatilai at laiskiainen.org
Thu Oct 6 08:04:13 UTC 2011

On 10/06/2011 03:38 AM, Alfred Landrum wrote:
> I'm working on a system to build rpms from many potential srpms and spec
> files, so the rpmspec utility looks like it should be very useful to
> calculate build dependencies. However, I find it curious that it doesn't
> report a 'provides' entry for the package itself:
> [alfred at alfred-f15 ~]$ rpmspec --version
> RPM version
> [alfred at alfred-f15 ~]$ rpmspec -q --provides --srpm work/specs/m4.spec
> [alfred at alfred-f15 ~]$
> If built, the rpm reports itself as a provided capability:
> [alfred at main-sh270:/work/alfred]$ rpm -qp --provides
> rpmbuild/RPMS/x86_64/m4-1.4.13-5.el6.x86_64.rpm
> m4 = 1.4.13-5.el6
> m4(x86-64) = 1.4.13-5.el6
> I realize I can use the --queryformat option to build out the envr string,
> but just thought it surprising that that wasn't part of the listed
> provides.  Plus, I'm trying to use some of the innards of yum, and not
> having the provide string is tripping that up.
> Thanks for any pointers/advice; I'm new to working with rpm.

Right, many things (including the implicit self-provides) are added to 
the headers late in the process of building, not while parsing. In some 
cases there's a reason for it, but I don't see why the self-provides 
couldn't be added during parsing. Thanks for pointing out the issue, 
fixed upstream now:

[pmatilai at localhost rpm]$ ./rpmspec -q --provides ~/dist/m4/m4.spec
m4 = 1.4.16-2.fc15
m4(x86-64) = 1.4.16-2.fc15
m4-debuginfo = 1.4.16-2.fc15
m4-debuginfo(x86-64) = 1.4.16-2.fc15
[pmatilai at localhost rpm]$

	- Panu -

More information about the Rpm-list mailing list