Don't trigger the --root-deps code for removal actions such as --prune and
authorZac Medico <zmedico@gentoo.org>
Mon, 10 Aug 2009 02:53:48 +0000 (02:53 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 10 Aug 2009 02:53:48 +0000 (02:53 -0000)
--depclean.

svn path=/main/trunk/; revision=13971

pym/_emerge/depgraph.py

index a8ed267e7846a573db3526a70d905eb4bc11f72a..7de993464d22d6baaa1336796c98a956422c86e0 100644 (file)
@@ -1014,15 +1014,16 @@ class depgraph(object):
                if removal_action and self._frozen_config.myopts.get("--with-bdeps", "y") == "n":
                        edepend["DEPEND"] = ""
 
-               bdeps_root = "/"
                if removal_action:
                        bdeps_root = myroot
-               root_deps = self._frozen_config.myopts.get("--root-deps")
-               if root_deps is not None:
-                       if root_deps is True:
-                               bdeps_root = myroot
-                       elif root_deps == "rdeps":
-                               edepend["DEPEND"] = ""
+               else:
+                       bdeps_root = "/"
+                       root_deps = self._frozen_config.myopts.get("--root-deps")
+                       if root_deps is not None:
+                               if root_deps is True:
+                                       bdeps_root = myroot
+                               elif root_deps == "rdeps":
+                                       edepend["DEPEND"] = ""
 
                deps = (
                        (bdeps_root, edepend["DEPEND"],