Merged from trunk -r11472:11475
authorFabian Groffen <grobian@gentoo.org>
Wed, 27 Aug 2008 18:00:00 +0000 (18:00 -0000)
committerFabian Groffen <grobian@gentoo.org>
Wed, 27 Aug 2008 18:00:00 +0000 (18:00 -0000)
   | 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

pym/_emerge/__init__.py
pym/portage/dbapi/vartree.py

index dff280ba55d2c6b24ddbedaeed0d39ccb1609217..e16621ab51ed576007ba914c5f7dc07c729ff9cf 100644 (file)
@@ -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(
index b4b4e7748a8dabf72f17fa0ab3d4911794dc91bf..89dcffa585e0f8c2abcf4de01a70071689385ddd 100644 (file)
@@ -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):
                        """