Gentoo Archives: gentoo-commits

From: "Fabian Groffen (grobian)" <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r11477 - in main/branches/prefix/pym: _emerge portage/dbapi
Date: Wed, 27 Aug 2008 18:00:06
Message-Id: E1KYPJK-0008Ag-2d@stork.gentoo.org
1 Author: grobian
2 Date: 2008-08-27 18:00:00 +0000 (Wed, 27 Aug 2008)
3 New Revision: 11477
4
5 Modified:
6 main/branches/prefix/pym/_emerge/__init__.py
7 main/branches/prefix/pym/portage/dbapi/vartree.py
8 Log:
9 Merged from trunk -r11472:11475
10
11 | 11473 | Fix _ObjectKey.__eq__() to account for potential hash |
12 | zmedico | collisions that would break dict behavior. Thanks to Lucian |
13 | | Poston for spotting this. |
14
15 | 11474 | Revert recent changes to _ObjectKey.__eq__() since it's |
16 | zmedico | probably a bug if the wrong type is compared for equality |
17 | | anyway. |
18
19 | 11475 | When reloading the emerge config due to global updates in |
20 | zmedico | action_sync(), correctly update the local root_config |
21 | | reference. This should fix a KeyError: 'porttree' exception |
22 | | that's been reported to be triggered after --sync. |
23
24
25 Modified: main/branches/prefix/pym/_emerge/__init__.py
26 ===================================================================
27 --- main/branches/prefix/pym/_emerge/__init__.py 2008-08-27 17:52:07 UTC (rev 11476)
28 +++ main/branches/prefix/pym/_emerge/__init__.py 2008-08-27 18:00:00 UTC (rev 11477)
29 @@ -11592,6 +11592,7 @@
30 # Reload the whole config from scratch.
31 settings, trees, mtimedb = load_emerge_config(trees=trees)
32 portdb = trees[settings["ROOT"]]["porttree"].dbapi
33 + root_config = trees[settings["ROOT"]]["root_config"]
34
35 mybestpv = portdb.xmatch("bestmatch-visible", "sys-apps/portage")
36 mypvs = portage.best(
37
38 Modified: main/branches/prefix/pym/portage/dbapi/vartree.py
39 ===================================================================
40 --- main/branches/prefix/pym/portage/dbapi/vartree.py 2008-08-27 17:52:07 UTC (rev 11476)
41 +++ main/branches/prefix/pym/portage/dbapi/vartree.py 2008-08-27 18:00:00 UTC (rev 11477)
42 @@ -169,11 +169,7 @@
43 return hash(self._key)
44
45 def __eq__(self, other):
46 - if isinstance(other, self.__class__):
47 - other_key = other._key
48 - else:
49 - other_key = other
50 - return self._key == other_key
51 + return self._key == other._key
52
53 def _generate_object_key(self, object):
54 """