summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-10-08 22:54:58 +0000
committerZac Medico <zmedico@gentoo.org>2006-10-08 22:54:58 +0000
commit4ecd279c5a9ca277f12323071f0cf3efdcf0a432 (patch)
treec68368da5a8b86e2d5f9a464790354d6fecb8b5a
parent6797ab6f78db028d72394d528bb0dc458c54066e (diff)
downloadportage-4ecd279c5a9ca277f12323071f0cf3efdcf0a432.tar.gz
portage-4ecd279c5a9ca277f12323071f0cf3efdcf0a432.tar.bz2
portage-4ecd279c5a9ca277f12323071f0cf3efdcf0a432.zip
Clean up depgraph.select_files() to use one list of tuples instead 2 separate lists.
svn path=/main/trunk/; revision=4624
-rwxr-xr-xbin/emerge29
1 files changed, 11 insertions, 18 deletions
diff --git a/bin/emerge b/bin/emerge
index 150b8732a..ab6d4b52e 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -870,8 +870,7 @@ class depgraph:
portdb = self.trees[myroot]["porttree"].dbapi
bindb = self.trees[myroot]["bintree"].dbapi
pkgsettings = self.pkgsettings[myroot]
- self.args_keys = []
- raw_args = []
+ arg_atoms = []
for x in myfiles:
ext = os.path.splitext(x)[1]
if ext==".tbz2":
@@ -934,14 +933,12 @@ class depgraph:
settings=pkgsettings)
if (mykey and not mykey.startswith("null/")) or \
"--usepkgonly" in self.myopts:
- self.args_keys.append(mykey)
- raw_args.append(x)
+ arg_atoms.append((x, mykey))
continue
mykey = portage.dep_expand(x,
mydb=portdb, settings=pkgsettings)
- self.args_keys.append(mykey)
- raw_args.append(x)
+ arg_atoms.append((x, mykey))
except ValueError, errpkgs:
print "\n\n!!! The short ebuild name \"" + x + "\" is ambiguous. Please specify"
print "!!! one of the following fully-qualified ebuild names instead:\n"
@@ -955,11 +952,8 @@ class depgraph:
with --emptytree also, to ensure that all slots are remerged."""
vardb = self.trees[self.target_root]["vartree"].dbapi
greedy_atoms = []
- raw_greedy = []
- for i in xrange(len(self.args_keys)):
- myatom = self.args_keys[i]
- greedy_atoms.append(myatom)
- raw_greedy.append(raw_args[i])
+ for myarg, myatom in arg_atoms:
+ greedy_atoms.append((myarg, myatom))
myslots = set()
for cpv in vardb.match(myatom):
myslots.add(vardb.aux_get(cpv, ["SLOT"])[0])
@@ -977,15 +971,14 @@ class depgraph:
"bintree"].dbapi.match(myslot_atom):
available = True
if available:
- greedy_atoms.append(myslot_atom)
- raw_greedy.append(raw_args[i])
- self.args_keys = greedy_atoms
- raw_args = raw_greedy
+ greedy_atoms.append((myarg, myslot_atom))
+ arg_atoms = greedy_atoms
- for i in xrange(len(self.args_keys)):
- mykey = self.args_keys[i]
+ self.args_keys = []
+ for myarg, myatom in arg_atoms:
+ self.args_keys.append(myatom)
try:
- self.mysd = self.select_dep(myroot, mykey, arg=raw_args[i])
+ self.mysd = self.select_dep(myroot, myatom, arg=myarg)
except portage_exception.MissingSignature, e:
portage.writemsg("\n\n!!! A missing gpg signature is preventing portage from calculating the\n")
portage.writemsg("!!! required dependencies. This is a security feature enabled by the admin\n")