[Rpm-maint] silly idea for srpms

seth vidal skvidal at fedoraproject.org
Tue Dec 7 19:52:00 UTC 2010

it'd be nice to have one of two things in rpm to do directly from the
python bindings. I've hacked around it - but it ain't pretty:

1. for a srpm to carry the specfile contents as an rpm tag that we can
get to just with rpm -qp --qf %{specfile}\n foo.rpm. So we don't have to
go through the trouble of cracking the rpm itself to get the specfile

2. some way to extract the specfile from the srpm w/o having to go
through a subprocess call and/or other pain to rpm2cpio.

Here's why - it would be handy for retrieving the spec file, passing it
to rpm.spec() to generate the list of binary pkgs that would be created
by this srpm being built.

what would be the preferred route to doing that?

the reason i suggested 1 is that would mean that pulling the rpm header
would give you that info and not require you to fetch all of the package
payload (which could be quite big)



More information about the Rpm-maint mailing list