Re: Slides for rpm-python

Paul Nasrat <pauln-xGvoirzvwgBWk0Htik3J/[email protected]> Mon, 26 Jul 2004 13:34:36 +0000
Newsgroups gmane.linux.redhat.rpm.python
Message-ID <[email protected]>
On Mon, Jul 26, 2004 at 09:08:55AM -0400, Kornfeld Rick (sys1rak) wrote:
> Paul
> 
> This is very helpful thank you. However, have you found a way in Python to
> implement some of the RPM command line arguments like --force or --nodeps ?

This has been covered before here - in response to your questions:

https://lists.dulug.duke.edu/pipermail/rpm-python-list/2004-March/000088.html

Force is equivalent to:

ts = rpm.TransactionSet()
ts.setProbFilter(rpm.RPMPROB_FILTER_REPLACEPKG | 
                 rpm.RPMPROB_FILTER_REPLACEOLDFILES | 
                 rpm.RPMPROB_FILTER_REPLACENEWFILES |
		 rpm.RPMPROB_FILTER_OLDPACKAGE )
...
ts.run(callback)

More info in:

file:///usr/share/doc/rpm-devel-4.3.1/apidocs/html/group__python.html

Paul