diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2011-02-15 13:49:44 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2011-02-15 13:52:19 +0200 |
commit | 83f3b79ccaea675bd19d55eae711d5e1c8c4da7d (patch) | |
tree | f26e1f0693dfb62899d0e7a3e5964669964e1c4f | |
parent | d3475ef4682e70e0d0e6fee1c42ac0e763fecd48 (diff) | |
download | librpm-tizen-83f3b79ccaea675bd19d55eae711d5e1c8c4da7d.tar.gz librpm-tizen-83f3b79ccaea675bd19d55eae711d5e1c8c4da7d.tar.bz2 librpm-tizen-83f3b79ccaea675bd19d55eae711d5e1c8c4da7d.zip |
Import the C-level ts python object as TransactionSetCore
- The previous _rpmts name suggests its some scary internal stuff
that shouldn't be used when that's not the case, it's just a
lower level interface to the same thing.
-rw-r--r-- | python/rpm/transaction.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/python/rpm/transaction.py b/python/rpm/transaction.py index 153206f60..adcb1bb88 100644 --- a/python/rpm/transaction.py +++ b/python/rpm/transaction.py @@ -1,10 +1,10 @@ #!/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): @@ -58,7 +58,7 @@ class TransactionSet(_rpmts): 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): @@ -75,7 +75,7 @@ class TransactionSet(_rpmts): 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... @@ -83,7 +83,7 @@ class TransactionSet(_rpmts): 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 @@ -99,7 +99,7 @@ class TransactionSet(_rpmts): 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 = [] @@ -134,7 +134,7 @@ class TransactionSet(_rpmts): 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") @@ -144,7 +144,7 @@ class TransactionSet(_rpmts): 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") |