summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-12-21 08:09:20 +0000
committerZac Medico <zmedico@gentoo.org>2006-12-21 08:09:20 +0000
commitee491da35646a8f405eb5666c1c9f961d82ffe6b (patch)
treef9bafea5794c0298e594e68ed589f2ac9ba32b47
parent18de7eb55f69953e368a279e46a7568ad71fa7ca (diff)
downloadportage-ee491da35646a8f405eb5666c1c9f961d82ffe6b.tar.gz
portage-ee491da35646a8f405eb5666c1c9f961d82ffe6b.tar.bz2
portage-ee491da35646a8f405eb5666c1c9f961d82ffe6b.zip
Make emerge enable backward compatibility mode for dep_check() calls on installed packages so that it can gracefully invalid atoms or dep syntax.
svn path=/main/trunk/; revision=5346
-rwxr-xr-xbin/emerge34
1 files changed, 25 insertions, 9 deletions
diff --git a/bin/emerge b/bin/emerge
index 153160d8b..d760377e1 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -40,6 +40,7 @@ from output import create_color_func
good = create_color_func("GOOD")
bad = create_color_func("BAD")
+import portage_dep
import portage_util
import portage_locks
import portage_exception
@@ -1376,6 +1377,8 @@ class depgraph:
bindb = self.trees[myroot]["bintree"].dbapi
vardb = self.trees[myroot]["vartree"].dbapi
pkgsettings = self.pkgsettings[myroot]
+ if myparent:
+ p_type, p_root, p_key, p_status = myparent
if "--debug" in self.myopts:
print
@@ -1388,10 +1391,15 @@ class depgraph:
#processing dependencies
""" Call portage.dep_check to evaluate the use? conditionals and make sure all
dependencies are satisfiable. """
- mycheck = portage.dep_check(depstring, None,
- pkgsettings, myuse=myuse,
- use_binaries=("--usepkgonly" in self.myopts),
- myroot=myroot, trees=self.trees)
+ try:
+ if myparent and p_status == "nomerge":
+ portage_dep._dep_check_strict = False
+ mycheck = portage.dep_check(depstring, None,
+ pkgsettings, myuse=myuse,
+ use_binaries=("--usepkgonly" in self.myopts),
+ myroot=myroot, trees=self.trees)
+ finally:
+ portage_dep._dep_check_strict = True
if not mycheck[0]:
show_invalid_depstring_notice(myparent, depstring, mycheck[1])
@@ -1658,9 +1666,13 @@ class depgraph:
# It is crucial to pass in final_db here in order to
# optimize dep_check calls by eliminating atoms via
# dep_wordreduce and dep_eval calls.
- success, atoms = portage.dep_check(depstr, final_db,
- pkgsettings, myuse=myuse, trees=dep_check_trees,
- myroot=myroot)
+ try:
+ portage_dep._dep_check_strict = False
+ success, atoms = portage.dep_check(depstr,
+ final_db, pkgsettings, myuse=myuse,
+ trees=dep_check_trees, myroot=myroot)
+ finally:
+ portage_dep._dep_check_strict = True
if not success:
slot_atom = "%s:%s" % (portage.dep_getkey(pkg),
vardb.aux_get(pkg, ["SLOT"])[0])
@@ -4264,8 +4276,12 @@ def action_depclean(settings, trees, ldpath_mtimes,
else:
print "hard"
- success, atoms = portage.dep_check(depstr, None, settings,
- myuse=usedef, trees=dep_check_trees, myroot=myroot)
+ try:
+ portage_dep._dep_check_strict = False
+ success, atoms = portage.dep_check(depstr, None, settings,
+ myuse=usedef, trees=dep_check_trees, myroot=myroot)
+ finally:
+ portage_dep._dep_check_strict = True
if not success:
show_invalid_depstring_notice(
("installed", myroot, pkg, "nomerge"),