For bug #166939, make --nodeps work like a normal package for new-style virtuals...
authorZac Medico <zmedico@gentoo.org>
Sat, 17 Feb 2007 19:44:39 +0000 (19:44 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 17 Feb 2007 19:44:39 +0000 (19:44 -0000)
svn path=/main/branches/2.1.2/; revision=5985

bin/emerge

index 33db36435fd4ec07264004aaf0a40255b522a081..593528542ffb7654d773dd7e2a51821b0283f203 100755 (executable)
@@ -1517,23 +1517,31 @@ class depgraph:
                #processing dependencies
                """ Call portage.dep_check to evaluate the use? conditionals and make sure all
                dependencies are satisfiable. """
-               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]:
-                       if myparent:
-                               show_invalid_depstring_notice(myparent, depstring, mycheck[1])
-                       else:
-                               sys.stderr.write("\n%s\n%s\n" % (depstring, mycheck[1]))
-                       return 0
-               mymerge = mycheck[1]
+               if arg:
+                       mymerge = [depstring]
+                       pprovided = pkgsettings.pprovideddict.get(
+                               portage.dep_getkey(depstring))
+                       if pprovided and portage.match_from_list(depstring, pprovided):
+                               mymerge = []
+               else:
+                       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]:
+                               if myparent:
+                                       show_invalid_depstring_notice(
+                                               myparent, depstring, mycheck[1])
+                               else:
+                                       sys.stderr.write("\n%s\n%s\n" % (depstring, mycheck[1]))
+                               return 0
+                       mymerge = mycheck[1]
 
                if not mymerge and arg and \
                        portage.best_match_to_list(depstring, self.args_keys):