diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-06-15 23:10:43 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-06-15 23:10:43 +0000 |
commit | 1135dc0eb64614edd36b62849aee9ccfc6829613 (patch) | |
tree | 2e5c0459b8f50e6b9dc13b42ea7c28867ae39997 | |
parent | 2f7623de3fd05f3be34ccd18d6f06c4fb1144c4a (diff) | |
download | portage-1135dc0eb64614edd36b62849aee9ccfc6829613.tar.gz portage-1135dc0eb64614edd36b62849aee9ccfc6829613.tar.bz2 portage-1135dc0eb64614edd36b62849aee9ccfc6829613.zip |
Only attempt to unmerge the already-installed instance if it actually exists. This patch prevents self.settings.configdict["pkg"] from getting nuked by a call to load_infodir on a nonexistent directory. By preserving configdict["pkg"] here, the CATEGORY is available for the next doebuild call (needed to create log names correctly).
svn path=/main/trunk/; revision=3514
-rw-r--r-- | pym/portage.py | 11 |
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 |