summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage.py11
1 files changed, 6 insertions, 5 deletions
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