From ed4e91f0473b5cfcbb1d6de22991bbf3e270a6e3 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 18 Jul 2012 10:19:07 -0700 Subject: [PATCH] depgraph: __auto_rebuild__ KeyError, bug #427036 --- pym/_emerge/DependencyArg.py | 5 +++-- pym/_emerge/depgraph.py | 7 ++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pym/_emerge/DependencyArg.py b/pym/_emerge/DependencyArg.py index ba36f78d2..80134c804 100644 --- a/pym/_emerge/DependencyArg.py +++ b/pym/_emerge/DependencyArg.py @@ -7,9 +7,9 @@ from portage import _encodings, _unicode_encode, _unicode_decode class DependencyArg(object): - __slots__ = ('arg', 'force_reinstall', 'reset_depth', 'root_config') + __slots__ = ('arg', 'force_reinstall', 'internal', 'reset_depth', 'root_config') - def __init__(self, arg=None, force_reinstall=False, + def __init__(self, arg=None, force_reinstall=False, internal=False, reset_depth=True, root_config=None): """ Use reset_depth=False for special arguments that should not interact @@ -17,6 +17,7 @@ class DependencyArg(object): """ self.arg = arg self.force_reinstall = force_reinstall + self.internal = internal self.reset_depth = reset_depth self.root_config = root_config diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 552d57854..0f3bc9389 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -2533,7 +2533,8 @@ class depgraph(object): if isinstance(arg, (AtomArg, PackageArg)): myfavorites.add(arg.atom) elif isinstance(arg, SetArg): - myfavorites.add(arg.arg) + if not arg.internal: + myfavorites.add(arg.arg) myfavorites = list(myfavorites) if debug: @@ -2566,6 +2567,7 @@ class depgraph(object): # to behave like normal arguments in most other respects. pset=InternalPackageSet(initial_atoms=atoms), force_reinstall=True, + internal=True, reset_depth=False, root_config=self._frozen_config.roots[root]) @@ -6793,6 +6795,9 @@ class depgraph(object): continue if arg.root_config.root != root_config.root: continue + if arg.internal: + # __auto_* sets + continue k = arg.name if k in ("selected", "world") or \ not root_config.sets[k].world_candidate: -- 2.26.2