summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-06-21 03:10:42 +0000
committerZac Medico <zmedico@gentoo.org>2006-06-21 03:10:42 +0000
commit3f85e659b64ede24c16178bab63e587b841e2672 (patch)
tree33dd1e837bf2ff2901ae1de8f180cb8d7d95710d
parente98d1e3501a727bccd892d96dd10a09120348f5f (diff)
downloadportage-3f85e659b64ede24c16178bab63e587b841e2672.tar.gz
portage-3f85e659b64ede24c16178bab63e587b841e2672.tar.bz2
portage-3f85e659b64ede24c16178bab63e587b841e2672.zip
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
-rw-r--r--pym/portage.py11
1 files 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