RPM Community Forums

Mailing List Message of <rpm-users>

Re: free() pointer error when using bindings to read specfile

From: Jeff Johnson <n3npq@mac.com>
Date: Sun 13 Sep 2009 - 17:29:06 CEST
Message-id: <4F378983-78FC-4DD8-86C4-350EB254C242@mac.com>

On Sep 13, 2009, at 11:08 AM, Eric MSP Veith wrote:

I'll see if I can reproduce the problem (I don't change much
with python/perl bindings).

The mechanism used by the python/perl bindings "works"
on cvs HEAD for me:

	$ rpm -q --specsrpm --yaml libselinux.spec

and YAML is quite easy to load into either perl or python.

There's --xml if you don't like --yaml, and there is
--specsrpm instead of --specfile if you want tags from
the SRPM rather than the binary RPM's.

> The perl version looks similar, but I'm using "RPM::Spec->new 
> ($file)" instead.
> I've got no clue on where to look further here. rpmbuild e.g. works  
> ok. Am I
> misung the bindings?

The fundamental flaw is that the python (and perl) bindings lack
sufficient methods to be generally useful. E.g. there are no methods
to unpack and run a %prep scriptlet.

73 de Jeff
Received on Sun Sep 13 17:29:27 2009
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.