---
yum/__init__.py | 12 ++++++++++--
yum/rpmtrans.py | 3 ++-
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/yum/__init__.py b/yum/__init__.py
index 5fb7c00..c4ef3ac 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -1654,10 +1654,10 @@ class YumBase(depsolve.Depsolve):
self.plugins.run('posttrans')
# sync up what just happened versus what is in the rpmdb
if not self.ts.isTsFlagSet(rpm.RPMTRANS_FLAG_TEST):
- self.verifyTransaction(resultobject)
+ self.verifyTransaction(resultobject, cb.display.event)
return resultobject
- def verifyTransaction(self, resultobject=None):
+ def verifyTransaction(self, resultobject=None, decb=None):
"""Check that the transaction did what was expected, and
propagate external yumdb information. Output error messages
if the transaction did not do what was expected.
@@ -1665,6 +1665,10 @@ class YumBase(depsolve.Depsolve):
:param resultobject: the :class:`yum.misc.GenericHolder`
object returned from the :func:`runTransaction` call that
ran the transaction
+ :param decb: the display event callback for the rpm transaction, we use
+ this to call "events"
+ object returned from the :func:`runTransaction` call that
+ ran the transaction
"""
# check to see that the rpmdb and the tsInfo roughly matches
# push package object metadata outside of rpmdb into yumdb
@@ -1679,7 +1683,11 @@ class YumBase(depsolve.Depsolve):
vt_st = time.time()
self.plugins.run('preverifytrans')
+ count = 0
for txmbr in self.tsInfo:
+ if decb is not None:
+ count += 1
+ decb(txmbr.name, 'verifying', count, len(self.tsInfo), 1, 1)
if txmbr.output_state in TS_INSTALL_STATES:
if not self.rpmdb.contains(po=txmbr.po):
# maybe a file log here, too
diff --git a/yum/rpmtrans.py b/yum/rpmtrans.py
index 9b265f9..71014ac 100644
--- a/yum/rpmtrans.py
+++ b/yum/rpmtrans.py
@@ -77,7 +77,8 @@ class RPMBaseCallback:
TS_OBSOLETED: _('Obsoleted'),
TS_OBSOLETING: _('Installing'),
TS_UPDATED: _('Cleanup'),
- 'repackaging': _('Repackaging')}
+ 'repackaging': _('Repackaging'),
+ 'verifying': _('Verifying')}
# The fileaction are not translated, most sane IMHO / Tim
self.fileaction = { TS_UPDATE: 'Updated',
TS_ERASE: 'Erased',
--
1.7.6
_______________________________________________
Yum-devel mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum-devel