summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-11-09 20:17:47 +0000
committerZac Medico <zmedico@gentoo.org>2007-11-09 20:17:47 +0000
commit1a1aaa3afc700631237067da68bc41e257013cd7 (patch)
tree1ee0626a525121d7e6df509e33e5dcf256baf9ee
parent524f7f3ac178e7d1710dbb49460df7eb105bf347 (diff)
downloadportage-1a1aaa3afc700631237067da68bc41e257013cd7.tar.gz
portage-1a1aaa3afc700631237067da68bc41e257013cd7.tar.bz2
portage-1a1aaa3afc700631237067da68bc41e257013cd7.zip
Clean up expansion of set arguments in depgraph.select_files().
svn path=/main/trunk/; revision=8482
-rw-r--r--pym/_emerge/__init__.py24
1 files changed, 13 insertions, 11 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 6a10ef28b..2f0177a71 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -1859,26 +1859,28 @@ class depgraph(object):
# Create the "args" package set from atoms and
# packages given as arguments.
args_set = self._sets["args"]
- expanded_args = []
for arg in args:
- if isinstance(arg, SetArg):
- for atom in arg.set:
- self._set_atoms.add(atom)
- expanded_args.append(AtomArg(arg=arg.arg, atom=atom,
- root_config=root_config))
+ if not isinstance(arg, (AtomArg, PackageArg)):
continue
- expanded_args.append(arg)
myatom = arg.atom
if myatom in args_set:
continue
args_set.add(myatom)
- self._set_atoms.add(myatom)
if not oneshot:
myfavorites.append(myatom)
- args = expanded_args
- del expanded_args
+ for pkg_set in self._sets.itervalues():
+ self._set_atoms.update(pkg_set)
pprovideddict = pkgsettings.pprovideddict
- for arg in args:
+ # Order needs to be preserved since a feature of --nodeps
+ # is to allow the user to force a specific merge order.
+ args.reverse()
+ while args:
+ arg = args.pop()
+ if isinstance(arg, SetArg):
+ for atom in arg.set:
+ args.append(AtomArg(arg=arg.arg, atom=atom,
+ root_config=root_config))
+ continue
atom = arg.atom
try:
pprovided = pprovideddict.get(portage.dep_getkey(atom))