Check the dep_check return value and fail with a message if an error has occurred.
authorZac Medico <zmedico@gentoo.org>
Mon, 25 Sep 2006 20:07:08 +0000 (20:07 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 25 Sep 2006 20:07:08 +0000 (20:07 -0000)
svn path=/main/trunk/; revision=4528

bin/emerge

index 9e17931c3c4140ae91e0462dc81c890480cb59a8..7a5a9f7b3b6828071626cad043499d92fdfb88ea 100755 (executable)
@@ -1051,24 +1051,20 @@ class depgraph:
                                print "Reverse:", rev_deps
                        if soft_deps:
                                print "Soft:", soft_deps
-               
-               if not arg:
-                       #processing dependencies
-                       """ Call portage.dep_check to evaluate the use? conditionals and make sure all
-                       dependencies are satisfiable. """
-                       mycheck = portage.dep_check(depstring, self.mydbapi[myroot],
-                               pkgsettings, myuse=myuse,
-                               use_binaries=("--usepkgonly" in self.myopts),
-                               myroot=myroot, trees=self.trees, return_all_deps=True)
-
-                       if not mycheck[0]:
-                               mymerge=[]
-                       else:
-                               mymerge=mycheck[1]
 
-               else:
-                       #we're processing a command-line argument; unconditionally merge it even if it's already merged
-                       mymerge=[depstring]
+               #processing dependencies
+               """ Call portage.dep_check to evaluate the use? conditionals and make sure all
+               dependencies are satisfiable. """
+               mycheck = portage.dep_check(depstring, self.mydbapi[myroot],
+                       pkgsettings, myuse=myuse,
+                       use_binaries=("--usepkgonly" in self.myopts),
+                       myroot=myroot, trees=self.trees, return_all_deps=True)
+
+               if not mycheck[0]:
+                       sys.stderr.write("\n\n%s\n\n" % mycheck[1])
+                       sys.stderr.write("%s\n\n" % depstring)
+                       return 0
+               mymerge = mycheck[1]
 
                if myparent:
                        # In order to get past circular dependencies (in