Re: Looking for more info
seth vidal <skvidal-c/MNwgJ9CEH2fBVCVOL8/[email protected]> Fri, 19 Mar 2004 21:19:40 -0500
| Newsgroups | gmane.linux.redhat.rpm.python |
|---|---|
| Message-ID | <1079749179.10221.3.camel@binkley> |
On Fri, 2004-03-19 at 21:14 -0500, Adam T. Gautier wrote:
> I am looking for general programming info for the rpm-python package. I
> am relatively new to python but have many years of OO experience. Is
> there any documentation for this package or should I just dig through
> the source. I am looking to write a script that will need to erase
> packages in the rpm database just like 'rpm -e <package-name>'. I think
> that if I could look at some object of ducumentation I could quickly get
> the script working. Thanks for all your help.
>
It's not a lot of code to do that, though. What else do you want to do
besides rpm -e?
import rpm
ts = rpm.TransactionSet()
ts.addErase('pkgname')
ts.run(callback=my_install_callback_instance)
you need the callback but you can steal that from all over. :)
-sv