aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-06-17 12:39:06 -0700
committerZac Medico <zmedico@gentoo.org>2011-06-17 12:39:06 -0700
commit8788bb4765821026ca0524985b7b20fd50e618ad (patch)
treedf79834271ee16e0d925d6c62a230016517f7635
parentdoebuild: export REPLACING_VERSIONS more (diff)
downloadportage-8788bb4765821026ca0524985b7b20fd50e618ad.tar.gz
portage-8788bb4765821026ca0524985b7b20fd50e618ad.tar.bz2
portage-8788bb4765821026ca0524985b7b20fd50e618ad.zip
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.
-rw-r--r--pym/portage/package/ebuild/doebuild.py8
1 files changed, 6 insertions, 2 deletions
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.