In --buildpkgonly mode, don't discard RDEPEND and PDEPEND if --empty or
authorZac Medico <zmedico@gentoo.org>
Sun, 13 Apr 2008 01:53:04 +0000 (01:53 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 13 Apr 2008 01:53:04 +0000 (01:53 -0000)
--deep are enabled. The makes it possible to run `emerge -eB world` and
have every single package rebuilt (without actually installing anything).

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

pym/_emerge/__init__.py

index a7d397e9bdef7c9df61ebfb3b10bc52e07d30794..74bdecac5edda6c06576e02ca520a389f0b38f26 100644 (file)
@@ -2005,10 +2005,12 @@ class depgraph(object):
                for k in depkeys:
                        edepend[k] = metadata[k]
 
-               if mytype == "ebuild":
-                       if "--buildpkgonly" in self.myopts:
-                               edepend["RDEPEND"] = ""
-                               edepend["PDEPEND"] = ""
+               if not pkg.built and \
+                       "--buildpkgonly" in self.myopts and \
+                       "deep" not in self.myparams and \
+                       "empty" not in self.myparams:
+                       edepend["RDEPEND"] = ""
+                       edepend["PDEPEND"] = ""
                bdeps_satisfied = False
                if mytype in ("installed", "binary"):
                        if self.myopts.get("--with-bdeps", "n") == "y":