[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH rhel6-branch] (port from master) rpm doesn't always give the callback a tuple (#605172).



From: Chris Lumens <clumens redhat com>

On erasure callbacks, we get just a string that's the name of the package
in question instead of the usual tuple.  We're most likely to hit this
during upgrades, after packages have been installed.


---
 yuminstall.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/yuminstall.py b/yuminstall.py
index 603e145..d420687 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -234,6 +234,9 @@ class AnacondaCallback:
         elif what in (rpm.RPMCALLBACK_CPIO_ERROR,
                       rpm.RPMCALLBACK_UNPACK_ERROR,
                       rpm.RPMCALLBACK_SCRIPT_ERROR):
+            if not isinstance(h, types.TupleType):
+                h = (h, None)
+
             (hdr, rpmloc) = h
 
             # Script errors store whether or not they're fatal in "total".  So,
-- 
1.6.0.6


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]