Call depgraph._set_args() inside _load_favorites(), to eliminate duplicate
authorZac Medico <zmedico@gentoo.org>
Sun, 18 Jan 2009 23:42:31 +0000 (23:42 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 18 Jan 2009 23:42:31 +0000 (23:42 -0000)
code. (trunk r12520)

svn path=/main/branches/2.1.6/; revision=12532

pym/_emerge/__init__.py

index 48a1e911a17bbed405170d8ef0e8fe1f110d708e..ec62ac831e092d199f9ac2adeab818ef3198c75a 100644 (file)
@@ -8551,27 +8551,7 @@ class depgraph(object):
                                args.append(AtomArg(arg=x, atom=x,
                                        root_config=root_config))
 
-               # Create the "args" package set from atoms and
-               # packages given as arguments.
-               args_set = self._sets["args"]
-               for arg in args:
-                       if not isinstance(arg, (AtomArg, PackageArg)):
-                               continue
-                       myatom = arg.atom
-                       if myatom in args_set:
-                               continue
-                       args_set.add(myatom)
-               self._set_atoms.update(chain(*self._sets.itervalues()))
-               atom_arg_map = self._atom_arg_map
-               for arg in args:
-                       for atom in arg.set:
-                               atom_key = (atom, arg.root_config.root)
-                               refs = atom_arg_map.get(atom_key)
-                               if refs is None:
-                                       refs = []
-                                       atom_arg_map[atom_key] = refs
-                                       if arg not in refs:
-                                               refs.append(arg)
+               self._set_args(args)
                return args
 
        class UnsatisfiedResumeDep(portage.exception.PortageException):