Blame SOURCES/BZ-1292087-history-hash-crash.patch

d2a170
commit 8ae3ad9a8bb297c39bc287802b3220e497dfbbcc
d2a170
Author: Michal Domonkos <mdomonko@redhat.com>
d2a170
Date:   Thu Apr 14 13:36:02 2016 +0200
d2a170
d2a170
    Make YumHistoryRpmdbProblem objects hashable. BZ 1292087
d2a170
    
d2a170
    Let's use rpid for that to ensure we get the same hash value for objects
d2a170
    that compare equal (which is iff their rpid's match, see __cmp__).
d2a170
d2a170
diff --git a/yum/history.py b/yum/history.py
d2a170
index d08837c..f1295de 100644
d2a170
--- a/yum/history.py
d2a170
+++ b/yum/history.py
d2a170
@@ -244,6 +244,9 @@ class YumHistoryRpmdbProblem:
d2a170
         ret = cmp(self.rpid, other.rpid)
d2a170
         return ret
d2a170
 
d2a170
+    def __hash__(self):
d2a170
+        return hash(self.rpid)
d2a170
+
d2a170
     def _getProbPkgs(self):
d2a170
         if self._loaded_P is None:
d2a170
             self._loaded_P = sorted(self._history._old_prob_pkgs(self.rpid))