Re: Installing a source rpm with Python API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On 10/30/2014 12:51 PM, DEGREMONT Aurelien wrote:

I'm trying to install a source rpm with Python API, as a non-root user.
Equivalent of:

$ rpm -iv ... mypackage.src.rpm

with Python.

I did not find a way to do that. I just find how to do a classic RPM
install (ts.addInstall(), but this locks the RPM database,
even if it will not modify it (as it is a source rpm), and so, need root

I found rpmInstallSourcePackage() in C source code, in lib/psm.c
but no equivalent in the Python binding.

How do to this?

There's no API to do it in the python bindings, but then you can just as well shell out and call 'rpm -i foo.src.rpm' from python, the API for src.rpm installs is simple and stupid enough that its not very useful...

	- Panu -

Rpm-list mailing list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux