From: Fabian Groffen Date: Wed, 27 Aug 2008 18:00:00 +0000 (-0000) Subject: Merged from trunk -r11472:11475 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=5759ac7d7184834dae2a0cd5d2bd6d91b0a8ea1a;p=portage.git Merged from trunk -r11472:11475 | 11473 | Fix _ObjectKey.__eq__() to account for potential hash | | zmedico | collisions that would break dict behavior. Thanks to Lucian | | | Poston for spotting this. | | 11474 | Revert recent changes to _ObjectKey.__eq__() since it's | | zmedico | probably a bug if the wrong type is compared for equality | | | anyway. | | 11475 | When reloading the emerge config due to global updates in | | zmedico | action_sync(), correctly update the local root_config | | | reference. This should fix a KeyError: 'porttree' exception | | | that's been reported to be triggered after --sync. | svn path=/main/branches/prefix/; revision=11477 --- diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index dff280ba5..e16621ab5 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -11592,6 +11592,7 @@ def action_sync(settings, trees, mtimedb, myopts, myaction): # Reload the whole config from scratch. settings, trees, mtimedb = load_emerge_config(trees=trees) portdb = trees[settings["ROOT"]]["porttree"].dbapi + root_config = trees[settings["ROOT"]]["root_config"] mybestpv = portdb.xmatch("bestmatch-visible", "sys-apps/portage") mypvs = portage.best( diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index b4b4e7748..89dcffa58 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -169,11 +169,7 @@ class LinkageMap(object): return hash(self._key) def __eq__(self, other): - if isinstance(other, self.__class__): - other_key = other._key - else: - other_key = other - return self._key == other_key + return self._key == other._key def _generate_object_key(self, object): """