summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-09-24 23:45:07 +0000
committerZac Medico <zmedico@gentoo.org>2006-09-24 23:45:07 +0000
commita57319288f8edac3484b40b2d389d82177029ea9 (patch)
treeeddb9510aa76a22b16525479471230de11b36e6c
parentc84599debee6d8c40a0860e1c3d4461fa1231d50 (diff)
downloadportage-a57319288f8edac3484b40b2d389d82177029ea9.tar.gz
portage-a57319288f8edac3484b40b2d389d82177029ea9.tar.bz2
portage-a57319288f8edac3484b40b2d389d82177029ea9.zip
Clean up and simplify depgraph params logic. This fixes bug #148893.
svn path=/main/trunk/; revision=4524
-rwxr-xr-xbin/emerge20
-rw-r--r--pym/portage.py3
2 files changed, 8 insertions, 15 deletions
diff --git a/bin/emerge b/bin/emerge
index 22dff0d50..cc7cae835 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -352,11 +352,13 @@ def create_depgraph_params(myopts, myaction):
# recurse: go into the dependencies
# deep: go into the dependencies of already merged packages
# empty: pretend nothing is merged
- myparams = ["self", "recurse", "selective"]
+ myparams = ["recurse"]
add=[]
sub=[]
if "--update" in myopts or myaction in ("system", "world"):
- add.append("empty")
+ add.extend(["selective"])
+ if "--noreplace" in myopts:
+ add.extend(["selective"])
if "--emptytree" in myopts:
add.extend(["empty"])
sub.extend(["selective"])
@@ -764,19 +766,9 @@ class depgraph:
merging=1
if addme:
# this is where we add the node to the list of packages to merge
- if (arg and "--noreplace" not in self.myopts) or not myparent:
- """ If there is no parent, the package was specified on the
- command line or is part of system/world sets.
- In either case, if we aren't in 'self' mode (where package
- is always included and if in 'selective' mode package is already
- installed we skip merging it."""
- if "self" not in self.myparams or \
- ("selective" in self.myparams and \
- not (arg and "--noreplace" not in self.myopts) and \
- vardbapi.cpv_exists(mykey)):
+ if "selective" in self.myparams or not arg:
+ if "empty" not in self.myparams and vardbapi.cpv_exists(mykey):
merging=0
- elif "selective" in self.myparams and vardbapi.cpv_exists(mykey):
- merging=0
""" If we aren't merging, perform the --newuse check.
If the package has new iuse flags or different use flags then if
diff --git a/pym/portage.py b/pym/portage.py
index 25377beb2..e4d95747e 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -3374,7 +3374,8 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None,
global db
trees = db
writemsg("ZapDeps -- %s\n" % (use_binaries), 2)
- if not reduced or unreduced == ["||"] or dep_eval(reduced):
+ if not reduced or unreduced == ["||"] or \
+ (not return_all_deps and dep_eval(reduced)):
return []
if unreduced[0] != "||":