S
shaneal
Hello,
I'm trying to script some sysadmin stuff, that requires rpm
manipulation (querying installed packages, removing packages,
installing packages).
Rather than manually parsing rpm's output, I noticed that someone had
written python-bindings for the rpmlib library (called rpm-python).
This seems much cleaner, but the documentation is sparse, and I
haven't been able to get uninstalling to work.
As root, I run the following:
I get no error messages/exceptions, but lynx is not removed.
I've also tried things along the lines of:
.... instance = mi.instance()
.... ts.addErase(instance)
and
.... ts.addErase(idx)
I've further confirmed that ts.dbMatch(rpm.RPMTAG_NAME, "lynx") does
in fact find the header for the lynx package via something like:.... print hdr['name'], hdr['version']
....
lynx 2.8.5
The only real documentation I've been able to find is
http://people.redhat.com/pnasrat/rpm-python/rpm-python-slides/frames.html
Is there some other module I should be using for rpm manipulation? Or,
if not, does anyone know what I'm doing wrong with this one?
I'm trying to script some sysadmin stuff, that requires rpm
manipulation (querying installed packages, removing packages,
installing packages).
Rather than manually parsing rpm's output, I noticed that someone had
written python-bindings for the rpmlib library (called rpm-python).
This seems much cleaner, but the documentation is sparse, and I
haven't been able to get uninstalling to work.
As root, I run the following:
I get no error messages/exceptions, but lynx is not removed.
I've also tried things along the lines of:
.... instance = mi.instance()
.... ts.addErase(instance)
and
.... ts.addErase(idx)
I've further confirmed that ts.dbMatch(rpm.RPMTAG_NAME, "lynx") does
in fact find the header for the lynx package via something like:.... print hdr['name'], hdr['version']
....
lynx 2.8.5
The only real documentation I've been able to find is
http://people.redhat.com/pnasrat/rpm-python/rpm-python-slides/frames.html
Is there some other module I should be using for rpm manipulation? Or,
if not, does anyone know what I'm doing wrong with this one?