Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:lpato:sll7
yum
BZ-1292087-history-hash-crash.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File BZ-1292087-history-hash-crash.patch of Package yum
commit 8ae3ad9a8bb297c39bc287802b3220e497dfbbcc Author: Michal Domonkos <mdomonko@redhat.com> Date: Thu Apr 14 13:36:02 2016 +0200 Make YumHistoryRpmdbProblem objects hashable. BZ 1292087 Let's use rpid for that to ensure we get the same hash value for objects that compare equal (which is iff their rpid's match, see __cmp__). diff --git a/yum/history.py b/yum/history.py index d08837c..f1295de 100644 --- a/yum/history.py +++ b/yum/history.py @@ -244,6 +244,9 @@ class YumHistoryRpmdbProblem: ret = cmp(self.rpid, other.rpid) return ret + def __hash__(self): + return hash(self.rpid) + def _getProbPkgs(self): if self._loaded_P is None: self._loaded_P = sorted(self._history._old_prob_pkgs(self.rpid))
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor