Fix --pretend logic in Binpkg some more.
authorZac Medico <zmedico@gentoo.org>
Fri, 12 Dec 2008 02:19:01 +0000 (02:19 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 12 Dec 2008 02:19:01 +0000 (02:19 -0000)
svn path=/main/trunk/; revision=12213

pym/_emerge/__init__.py

index dbe00b7099f60b34fb9acfebd58de47497e71025..eb1bd3b7a521f47bca660b8999841d893a94be08 100644 (file)
@@ -3184,7 +3184,7 @@ class Binpkg(CompositeTask):
 
                pkg = self.pkg
                pkg_count = self.pkg_count
-               if not self.opts.fetchonly:
+               if not (self.opts.pretend or self.opts.fetchonly):
                        self._build_dir.lock()
                        try:
                                shutil.rmtree(self._build_dir.dir_path)
@@ -3369,7 +3369,7 @@ class Binpkg(CompositeTask):
                self.wait()
 
        def _unlock_builddir(self):
-               if self.opts.fetchonly:
+               if self.opts.pretend or self.opts.fetchonly:
                        return
                portage.elog.elog_process(self.pkg.cpv, self.settings)
                self._build_dir.unlock()