[Rpm-maint] PATCH: Accessing file and policy lists from python (and C)
Alec Leamas
leamas.alec at gmail.com
Fri Sep 21 10:59:02 UTC 2012
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 [1],
>> 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
>> this.
>
> I'm curious: what exactly are you doing / planning to do with the file
> list?
>
>
[cut, lot's of]
It's fedora-review... we are reviewing the packages, comparing the raw,
unexpanded
list with various guidelines sections. 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 etc.
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).
--alec
More information about the Rpm-maint
mailing list