From 3f85e659b64ede24c16178bab63e587b841e2672 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 21 Jun 2006 03:10:42 +0000 Subject: [PATCH] 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 --- pym/portage.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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 -- 2.26.2