From: Zac Medico Date: Thu, 15 Jun 2006 23:10:43 +0000 (-0000) Subject: Only attempt to unmerge the already-installed instance if it actually exists. This... X-Git-Tag: v2.1.1~480 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1135dc0eb64614edd36b62849aee9ccfc6829613;p=portage.git Only attempt to unmerge the already-installed instance if it actually exists. This patch prevents self.settings.configdict["pkg"] from getting nuked by a call to load_infodir on a nonexistent directory. By preserving configdict["pkg"] here, the CATEGORY is available for the next doebuild call (needed to create log names correctly). svn path=/main/trunk/; revision=3514 --- diff --git a/pym/portage.py b/pym/portage.py index 486ee8ddf..b1c1cd9a2 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -6342,11 +6342,12 @@ class dblink: outfile.flush() outfile.close() - writemsg_stdout(">>> Safely unmerging already-installed instance...\n") - self.dbdir = self.dbpkgdir - self.unmerge(oldcontents,trimworld=0) - self.dbdir = self.dbtmpdir - writemsg_stdout(">>> Original instance of package unmerged safely.\n") + if os.path.exists(self.dbpkgdir): + writemsg_stdout(">>> Safely unmerging already-installed instance...\n") + self.dbdir = self.dbpkgdir + self.unmerge(oldcontents,trimworld=0) + self.dbdir = self.dbtmpdir + writemsg_stdout(">>> Original instance of package unmerged safely.\n") # We hold both directory locks. self.dbdir = self.dbpkgdir