-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
Do any python bindings exist for rpmbuild??
Specifically, I'd like to be able to detect broken build dependencies and recursively build and install these as part of an automated python/Makefile script.
I could of course just scrape the output :( but it would be excellent if there were wrappers for rpmbuild.
Ideally, these would allow one to parse the spec file into a python structure and to explicitly call %prep, %build, %install etc etc
Alan
On Tue, 4 Jan 2005, Alan Milligan wrote:
Do any python bindings exist for rpmbuild??
AFAIK there are no python wrappers for rpmbuild.
Specifically, I'd like to be able to detect broken build dependencies and recursively build and install these as part of an automated python/Makefile script.
You can find the dependencies with the existing rpm python bindings by doing a depcheck on a transactionset that includes the .src.rpm. The package building is not hard to do from python just by running rpmbuild, and installing them is done through the existing python rpm bindings.
Cheers, -- Elliot
sopwith@redhat.com (Elliot Lee) writes:
Specifically, I'd like to be able to detect broken build dependencies and recursively build and install these as part of an automated python/Makefile script.
You can find the dependencies with the existing rpm python bindings by doing a depcheck on a transactionset that includes the .src.rpm.
This will not work. With this method you determine the deps which were used to generate the existing .src.rpm. But you want to know the deps which will be needed to build the new packages.
E.g. the src.rpm from 'rpmbuild -bs ... --target=i386' with
| %ifarch %ix86 | BuildRequires: dietlibc | %endif
will have other deps than the build for the x86_64 arch.
Enrico
sopwith@redhat.com (Elliot Lee) writes:
E.g. the src.rpm from 'rpmbuild -bs ... --target=i386' with
| %ifarch %ix86 | BuildRequires: dietlibc | %endif
will have other deps than the build for the x86_64 arch.
This is a reason why rpm needs proper per-arch buildrequires.
A .src.rpm is usually architecture-independent and you generate binaries for all possible architectures out of a single src.rpm. '--define' options or '%(execute-a-dirty-script)' statements must be handled also since they can influence the buildrequires.
Enrico
alan@balclutha.org (Alan Milligan) writes:
Do any python bindings exist for rpmbuild??
Specifically, I'd like to be able to detect broken build dependencies and recursively build and install these as part of an automated python/Makefile script.
Sorry; no python bindings. But getdeps.c from [1] shows a way to do this in a native C way and with formatted output. Perhaps a simple python module can be generated out of this.
Enrico
Footnotes: [1] http://www-user.tu-chemnitz.de/~ensc/fedora.us-build/files/fedora.us-build-0...
devel@lists.stg.fedoraproject.org