Description of problem: I'm trying todo some automated processing & analysis of RPM specfiles and have found the python binding is lacking a number of key features - The 'spec' object allows access to the lists of sources, but doesn't expose the RPMBUILD_ISXXXX constants - The 'spec' object does not provide access to the 'packages' objects so you can't query most metadata about the spec. - None of the RPMTAG_XXX constants are defined, which makes using the 'header' object unpleasant. Version-Release number of selected component (if applicable): rpm-4.5.90-0.git8461.7.x86_64 How reproducible: Always Steps to Reproduce: 1. cat > foo.py <<EOF import rpm ts = rpm.ts() spec = ts.parseSpec("gtk2.spec") print str(spec.packages()) EOF 2. python foo.py Actual results: Traceback (most recent call last): File "foo.py", line 4, in <module> print str(spec.packages()) AttributeError: 'rpm.spec' object has no attribute 'packages' Expected results: $ python foo.py (<rpm.pkg object at 0x7f127df6a0f0>, <rpm.pkg object at 0x7f127df6a108>, <rpm.pkg object at 0x7f127df6a120>) Additional info:
Created attachment 317088 [details] Add binding to the package object in a spec Patch also sent upstream to: https://lists.dulug.duke.edu/pipermail/rpm-maint/2008-September/001132.html
This is implemented upstream finally. Implemented somewhat differently due to various other changes that have happened in the meanwhile, but the functionality is there. Thanks for your patience and the patch too.