Fix breakage in population of dynamic_config._set_atoms since the
authorZac Medico <zmedico@gentoo.org>
Sat, 18 Sep 2010 12:25:33 +0000 (05:25 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 18 Sep 2010 12:25:33 +0000 (05:25 -0700)
fix from bug #337540.

pym/_emerge/depgraph.py

index fd33beb2a5c2fecf408f7a372809bc30545ac7f7..d7d658a6ffdfcbe3171014116073473bdb1dd5fe 100644 (file)
@@ -1933,8 +1933,6 @@ class depgraph(object):
                        args_set.add(atom)
 
                self._dynamic_config._set_atoms.clear()
-               self._dynamic_config._set_atoms.update(chain.from_iterable(
-                       pset.getAtoms() for pset in self._dynamic_config._sets.values()))
                atom_arg_map = self._dynamic_config._atom_arg_map
                atom_arg_map.clear()
 
@@ -1942,8 +1940,11 @@ class depgraph(object):
                # happens at a later stage and we don't want to make
                # any state changes here that aren't reversed by a
                # another call to this method.
+               set_atoms = []
                for arg in self._expand_set_args(args, add_to_digraph=False):
                        for atom in arg.pset.getAtoms():
+                               if arg.root_config.root == self._frozen_config.target_root:
+                                       set_atoms.append(atom)
                                atom_key = (atom, arg.root_config.root)
                                refs = atom_arg_map.get(atom_key)
                                if refs is None:
@@ -1952,6 +1953,8 @@ class depgraph(object):
                                        if arg not in refs:
                                                refs.append(arg)
 
+               self._dynamic_config._set_atoms.update(set_atoms)
+
                # Invalidate the package selection cache, since
                # arguments influence package selections.
                self._dynamic_config._highest_pkg_cache.clear()