From: Zac Medico Date: Wed, 21 Jun 2006 03:10:42 +0000 (-0000) Subject: Only attempt to unmerge the already-installed instance if it actually exists. This... X-Git-Tag: v2.1-r1~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3f85e659b64ede24c16178bab63e587b841e2672;p=portage.git Only attempt to unmerge the already-installed instance if it actually exists. This patch is from trunk r3514. svn path=/main/branches/2.1/; revision=3575 --- diff --git a/pym/portage.py b/pym/portage.py index 042656dd6..0abfb8799 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -6343,11 +6343,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