Reading file list from .spec files in Python

Pavel Fedin p.fedin at samsung.com
Thu Jan 22 15:10:33 UTC 2015


 Hello! Is there anybody alive here ?

 I am taking over maintainership of Cygwin version of RPM and i am thinking
about a tool to automatically convert an SRPM into Cygwin's native Cygport
package.
 I have looked at Python scripting possibilities and RPM v4.12 offers
everything needed except for one "little" thing. File list in package header
appears to empty. I have studied the C code, file list is stored internally
in Package.fileList field (where Package is wrapped into what is rpm.spec on
Python side), and package header gets populated only when the package is
actually built.
 What about adding an API to be able to read %files sections of the spec ?
This is not a plain help request, i can do the implementation myself, just i
would like the change to be upstreamed.

Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia





More information about the Rpm-list mailing list