[Rpm-maint] PATCH: Accessing file and policy lists from python (and C)
pmatilai at laiskiainen.org
Fri Sep 21 11:42:05 UTC 2012
On 09/21/2012 01:59 PM, Alec Leamas wrote:
> On 09/21/2012 07:02 AM, Panu Matilainen wrote:
>> On 09/15/2012 05:47 PM, Alec Leamas wrote:
>>> When rpm-build parses the specfile, it also parses the file list and
>>> (nowadays?) also the policy. These are stored in specPackage objects
>>> attached to the spec. However, these items are not visible on the
>>> rpm.specPkg interface, neither from C nor from python.
>>> Is there a particular reason these items aren't visible?
>> It's simply because access to the flat, unpopulated file list doesn't
>> seem useful at all to me, and not exposing something means not having
>> to commit to an interface for it.
>>> I have som pronlems with this related to the fedora-review tool ,
>>> which basically forces us to use some hand-crafted specfile parsing ,
>>> since the file lists are needed. I would certainly prefer using rpmlib's
>>> own parsing for that. However, then external access to the fields
>>> fileList, fileFile and policyList is needed. The enclosed patch arranges
>> I'm curious: what exactly are you doing / planning to do with the file
> [cut, lot's of]
> It's fedora-review... we are reviewing the packages, comparing the
> raw, unexpanded list with various guidelines sections.
I guessed that much, but what kinds of things exactly? I'm mostly just
curious, but also wanting to see if there's something that rpm could
> So we need those lists (really only the %files lists, I policy is
> just for symmetry).
> The format of the list is not important for us, for sure. I
> understand the argument not using ARGV_t (after all, I was just
> focused on the python interface to be frank). A simple string is
> fine, and actually more like the other sections like build, install
Yup, the similarity with the others was one of my points.
> I might add that since the interface already exports the build, prep and
> install sections, it sort of seems natural to me to also export %files
> (+ perhaps the other, but that's not important for fedora-review).
I know... had it been up to me, most likely those wouldn't have been
exported to begin with :)
- Panu -
More information about the Rpm-maint