From: Zac Medico Date: Mon, 13 Mar 2006 02:27:23 +0000 (-0000) Subject: Do not clean shared ${T} after the unmerge phase when the new and old package are... X-Git-Tag: v2.1_pre7~107 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8def617693177f94db02d9d7211ebaec68bb8e9c;p=portage.git 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 --- 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):