Only attempt to unmerge the already-installed instance if it actually exists. This...
authorZac Medico <zmedico@gentoo.org>
Wed, 21 Jun 2006 03:10:42 +0000 (03:10 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 21 Jun 2006 03:10:42 +0000 (03:10 -0000)
svn path=/main/branches/2.1/; revision=3575

pym/portage.py

index 042656dd6b3f393379d36fcc1e9ec233c9bef825..0abfb87996de9e7db701d7647e621d61c00a6003 100644 (file)
@@ -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