diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-03-13 02:27:23 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-03-13 02:27:23 +0000 |
commit | 8def617693177f94db02d9d7211ebaec68bb8e9c (patch) | |
tree | b16f06f3aa9571fb22a3d3710776ba468f018985 | |
parent | 28ba8beadd0f87da18e8ae4366c425917289116c (diff) | |
download | portage-8def617693177f94db02d9d7211ebaec68bb8e9c.tar.gz portage-8def617693177f94db02d9d7211ebaec68bb8e9c.tar.bz2 portage-8def617693177f94db02d9d7211ebaec68bb8e9c.zip |
Do not clean shared ${T} after the unmerge phase when the new and old package are the same version (regression from r2844). See bug #125942.
svn path=/main/trunk/; revision=2865
-rw-r--r-- | pym/portage.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/pym/portage.py b/pym/portage.py index 142735cf8..057876d35 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -5687,6 +5687,15 @@ class dblink: #do prerm script if myebuildpath and os.path.exists(myebuildpath): + # XXX Bug: When unmerge of the installed instance is triggered by installation of + # a new one of the same version, the environments of the two instances should be + # separate (${T} should not be shared). Currently, when the version is the same, + # we don't clean because that would wipe out the env from the preinst phase that + # the postinst phase may depend on. The same applies to the clean phase that is + # at the end of this method, which should not be triggered when the new and old + # versions are the same (until the shared ${T} bug is fixed). + # + # Eventually, we'd like to pass in the saved ebuild env here... a=doebuild(myebuildpath,"prerm",self.myroot,self.settings,cleanup=cleanup,use_cache=0,tree=self.treetype) # XXX: Decide how to handle failures here. if a != 0: @@ -5852,8 +5861,8 @@ class dblink: if a != 0: writemsg("!!! FAILED postrm: "+str(a)+"\n") sys.exit(123) - if "noclean" not in features: - doebuild(myebuildpath, "clean", self.myroot, self.settings, cleanup=cleanup, tree=self.treetype) + if cleanup and "noclean" not in features: + doebuild(myebuildpath, "clean", self.myroot, self.settings, tree=self.treetype) self.unlockdb() def isowner(self,filename,destroot): |