Only attempt to unmerge the already-installed instance if it actually exists. This...
authorZac Medico <zmedico@gentoo.org>
Thu, 15 Jun 2006 23:10:43 +0000 (23:10 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 15 Jun 2006 23:10:43 +0000 (23:10 -0000)
svn path=/main/trunk/; revision=3514

pym/portage.py

index 486ee8ddf913ee5958f22ef5723cb59f39605746..b1c1cd9a2c2fe9e36efb51fcd98481b91331aabc 100644 (file)
@@ -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