Fix --pretend logic in Binpkg some more. (trunk r12213)
authorZac Medico <zmedico@gentoo.org>
Fri, 12 Dec 2008 21:51:21 +0000 (21:51 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 12 Dec 2008 21:51:21 +0000 (21:51 -0000)
svn path=/main/branches/2.1.6/; revision=12244

pym/_emerge/__init__.py

index a1783a001f10b0ed577a5c8bd256e0b0fe9d8b03..418acebb710a9982be307ea97410c9ce451f41d6 100644 (file)
@@ -3165,7 +3165,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)
@@ -3350,7 +3350,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()