Only lock PORTAGE_BUILDDIR if the ebuild exists (otherwise we don't run prerm and...
authorZac Medico <zmedico@gentoo.org>
Sat, 23 Sep 2006 10:30:25 +0000 (10:30 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 23 Sep 2006 10:30:25 +0000 (10:30 -0000)
svn path=/main/trunk/; revision=4515

pym/portage.py

index b158b291c10fbc115447faa2a29db14c5c49923a..b8bfa118e6e419021ba9b56e2b562b12a464182c 100644 (file)
@@ -5763,10 +5763,10 @@ class dblink:
                                gid=portage_gid, mode=070, mask=02)
                builddir_lock = None
                try:
-                       builddir_lock = portage_locks.lockdir(
-                               self.settings["PORTAGE_BUILDDIR"])
-
                        if myebuildpath:
+                               builddir_lock = portage_locks.lockdir(
+                                       self.settings["PORTAGE_BUILDDIR"])
+
                                # Eventually, we'd like to pass in the saved ebuild env here...
                                retval = doebuild(myebuildpath, "prerm", self.myroot,
                                        self.settings, cleanup=cleanup, use_cache=0,