From: Zac Medico Date: Fri, 17 Jun 2011 19:39:06 +0000 (-0700) Subject: doebuild: don't set REPLACING_VERSIONS for remove X-Git-Tag: v2.2.0_alpha42~51 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8788bb4765821026ca0524985b7b20fd50e618ad;p=portage.git doebuild: don't set REPLACING_VERSIONS for remove Also, don't call backup_changes with this variable, since it's not necessary and we don't want to pollute the config instance. --- diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py index 782e8f1b5..9df7dc76c 100644 --- a/pym/portage/package/ebuild/doebuild.py +++ b/pym/portage/package/ebuild/doebuild.py @@ -701,8 +701,13 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0, mysettings.configdict["pkg"]["EMERGE_FROM"] = "binary" mysettings.configdict["pkg"]["MERGE_TYPE"] = "binary" + # NOTE: It's not possible to set REPLACED_BY_VERSION for prerm + # and postrm here, since we don't necessarily know what + # versions are being installed. This could be a problem + # for API consumers if they don't use dblink.treewalk() + # to execute prerm and postrm. if eapi_exports_replace_vars(mysettings["EAPI"]) and \ - (mydo in ("postinst", "postrm", "preinst", "prerm", "pretend", "setup") or \ + (mydo in ("postinst", "preinst", "pretend", "setup") or \ ("noauto" not in features and not returnpid and \ (mydo in actionmap_deps or mydo in ("merge", "package", "qmerge")))): if not vartree: @@ -718,7 +723,6 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0, set(portage.versions.cpv_getversion(match) \ for match in vardb.match(cpv_slot) + \ vardb.match('='+cpv))) - mysettings.backup_changes("REPLACING_VERSIONS") # if any of these are being called, handle them -- running them out of # the sandbox -- and stop now.