[yum-cvs] yum/rpmtrans.py

Seth Vidal skvidal at linux.duke.edu
Thu Sep 6 15:51:42 UTC 2007


 yum/rpmtrans.py |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit fcf28aaf49bccdaf993a863b71297d8439992889
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Thu Sep 6 11:49:50 2007 -0400

    work around for obscure problem occuring with some obsoletes
    occasionally rpm sends along an extra callback event that wasn't in the
    transaction set to begin with. This ensures that if we receive those we
    don't explode. Thanks to Fajar A. Nugraha for providing with the
    replicating case and a system to test it on.

diff --git a/yum/rpmtrans.py b/yum/rpmtrans.py
index 42c094f..ecddce1 100644
--- a/yum/rpmtrans.py
+++ b/yum/rpmtrans.py
@@ -161,6 +161,13 @@ class RPMTransaction:
         # make sure the package and the action make some kind of sense
         # write it out and pop(0) from the list
         
+        # make sure we have a list to work from - rpm seems to be throwing us
+        # some curveballs
+        if len(self._te_tuples) == 0:
+            msg = 'extra callback for package %s in state %d' % (package, action)
+            self.display.errorlog(msg)
+            return
+
         (t,e,n,v,r,a) = self._te_tuples[0] # what we should be on
 
         # make sure we're in the right action state



More information about the Yum-cvs-commits mailing list