From 1135dc0eb64614edd36b62849aee9ccfc6829613 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 15 Jun 2006 23:10:43 +0000 Subject: 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 --- pym/portage.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'pym') 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 -- cgit v1.2.3-1-g7c22