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

svn path=/main/branches/2.1.2/; revision=9861

bin/emerge

index 3420abc55f0db4a21699503ce3ebc6e1e6b52ec7..b5e98ec4d27e9962519f8a3d3cf6a851c93c740b 100755 (executable)
@@ -2144,10 +2144,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":