summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-12-04 11:46:55 -0800
committerZac Medico <zmedico@gentoo.org>2010-12-04 11:48:06 -0800
commit482e101543604a793453c41c5b191824db30ea33 (patch)
treea101e5bf3e4731313c9748bbd7af1b0436d51b06
parent98f187a36e9d52896fbdcbd6dffc0b771f5bedd1 (diff)
downloadportage-482e101543604a793453c41c5b191824db30ea33.tar.gz
portage-482e101543604a793453c41c5b191824db30ea33.tar.bz2
portage-482e101543604a793453c41c5b191824db30ea33.zip
doebuild: set MERGE_TYPE for ebuild(1)
-rw-r--r--pym/portage/package/ebuild/doebuild.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index e1f34e755..6a232f364 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -39,7 +39,8 @@ from portage.data import portage_gid, portage_uid, secpass, \
uid, userpriv_groups
from portage.dbapi.virtual import fakedbapi
from portage.dep import Atom, paren_enclose, use_reduce
-from portage.eapi import eapi_exports_KV, eapi_exports_replace_vars, \
+from portage.eapi import eapi_exports_KV, eapi_exports_merge_type, \
+ eapi_exports_replace_vars, \
eapi_has_src_prepare_and_src_configure, eapi_has_pkg_pretend
from portage.elog import elog_process
from portage.elog.messages import eerror, eqawarn
@@ -638,6 +639,13 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
if rval != os.EX_OK:
return rval
+ if eapi_exports_merge_type(mysettings["EAPI"]) and \
+ "MERGE_TYPE" not in mysettings.configdict["pkg"]:
+ if tree == "porttree":
+ mysettings.configdict["pkg"]["MERGE_TYPE"] = "source"
+ elif tree == "bintree":
+ mysettings.configdict["pkg"]["MERGE_TYPE"] = "binary"
+
if eapi_exports_replace_vars(mysettings["EAPI"]) and \
(mydo in ("pretend", "setup") or \
("noauto" not in features and not returnpid and \