#!/usr/bin/python
import rpm
-from rpm._rpm import ts as _rpmts
+from rpm._rpm import ts as TransactionSetCore
# TODO: migrate relevant documentation from C-side
-class TransactionSet(_rpmts):
+class TransactionSet(TransactionSetCore):
_probFilter = 0
def _wrapSetGet(self, attr, val):
raise ValueError('how argument must be "u" or "i"')
upgrade = (how == "u")
- if not _rpmts.addInstall(self, header, key, upgrade):
+ if not TransactionSetCore.addInstall(self, header, key, upgrade):
raise rpm.error("adding package to transaction failed")
def addErase(self, item):
raise TypeError("invalid type %s" % type(item))
for h in hdrs:
- if not _rpmts.addErase(self, h):
+ if not TransactionSetCore.addErase(self, h):
raise rpm.error("package not installed")
# garbage collection should take care but just in case...
del hdrs
def run(self, callback, data):
- rc = _rpmts.run(self, callback, data, self._probFilter)
+ rc = TransactionSetCore.run(self, callback, data, self._probFilter)
# crazy backwards compatibility goo: None for ok, list of problems
# if transaction didnt complete and empty list if it completed
return res
def check(self, *args, **kwds):
- _rpmts.check(self, *args, **kwds)
+ TransactionSetCore.check(self, *args, **kwds)
# compatibility: munge problem strings into dependency tuples of doom
res = []
return res
def hdrCheck(self, blob):
- res, msg = _rpmts.hdrCheck(self, blob)
+ res, msg = TransactionSetCore.hdrCheck(self, blob)
# generate backwards compatibly broken exceptions
if res == rpm.RPMRC_NOKEY:
raise rpm.error("public key not available")
raise rpm.error(msg)
def hdrFromFdno(self, fd):
- res, h = _rpmts.hdrFromFdno(self, fd)
+ res, h = TransactionSetCore.hdrFromFdno(self, fd)
# generate backwards compatibly broken exceptions
if res == rpm.RPMRC_NOKEY:
raise rpm.error("public key not available")