summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-12-05 03:08:54 -0800
committerZac Medico <zmedico@gentoo.org>2010-12-05 03:08:54 -0800
commit5ec72f096420a170d0f778116722661443cc2c15 (patch)
treef6391031cdcac4b8c1f7a8caec7df4880d09694a
parenta1c89e016d692abd3faefadeac12423645ffcef8 (diff)
downloadportage-5ec72f096420a170d0f778116722661443cc2c15.tar.gz
portage-5ec72f096420a170d0f778116722661443cc2c15.tar.bz2
portage-5ec72f096420a170d0f778116722661443cc2c15.zip
Sync EMERGE_FROM code with MERGE_TYPE code.
-rw-r--r--pym/_emerge/Binpkg.py2
-rw-r--r--pym/_emerge/EbuildBuild.py2
-rw-r--r--pym/_emerge/Scheduler.py2
-rw-r--r--pym/portage/package/ebuild/doebuild.py2
4 files changed, 6 insertions, 2 deletions
diff --git a/pym/_emerge/Binpkg.py b/pym/_emerge/Binpkg.py
index 9279fa39a..8b93a2dfb 100644
--- a/pym/_emerge/Binpkg.py
+++ b/pym/_emerge/Binpkg.py
@@ -54,7 +54,7 @@ class Binpkg(CompositeTask):
(dir_path, self.settings['PORTAGE_BUILDDIR']))
self._build_dir = EbuildBuildDir(
scheduler=self.scheduler, settings=settings)
- settings.configdict["pkg"]["EMERGE_FROM"] = pkg.type_name
+ settings.configdict["pkg"]["EMERGE_FROM"] = "binary"
settings.configdict["pkg"]["MERGE_TYPE"] = "binary"
# The prefetcher has already completed or it
diff --git a/pym/_emerge/EbuildBuild.py b/pym/_emerge/EbuildBuild.py
index 6de7ac1c8..d19ef1af5 100644
--- a/pym/_emerge/EbuildBuild.py
+++ b/pym/_emerge/EbuildBuild.py
@@ -41,7 +41,7 @@ class EbuildBuild(CompositeTask):
self._tree = tree
portdb = root_config.trees[tree].dbapi
settings.setcpv(pkg)
- settings.configdict["pkg"]["EMERGE_FROM"] = pkg.type_name
+ settings.configdict["pkg"]["EMERGE_FROM"] = "ebuild"
if self.opts.buildpkgonly:
settings.configdict["pkg"]["MERGE_TYPE"] = "buildonly"
else:
diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py
index 32019f22e..2d252f8cb 100644
--- a/pym/_emerge/Scheduler.py
+++ b/pym/_emerge/Scheduler.py
@@ -1025,6 +1025,7 @@ class Scheduler(PollScheduler):
os.makedirs(infloc)
portage.xpak.tbz2(tbz2_file).unpackinfo(infloc)
ebuild_path = os.path.join(infloc, x.pf + ".ebuild")
+ settings.configdict["pkg"]["EMERGE_FROM"] = "binary"
settings.configdict["pkg"]["MERGE_TYPE"] = "binary"
else:
@@ -1033,6 +1034,7 @@ class Scheduler(PollScheduler):
ebuild_path = portdb.findname(x.cpv, myrepo=x.repo)
if ebuild_path is None:
raise AssertionError("ebuild not found for '%s'" % x.cpv)
+ settings.configdict["pkg"]["EMERGE_FROM"] = "ebuild"
if self._build_opts.buildpkgonly:
settings.configdict["pkg"]["MERGE_TYPE"] = "buildonly"
else:
diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index ba0a57836..5bba19ff8 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -642,8 +642,10 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
if eapi_exports_merge_type(mysettings["EAPI"]) and \
"MERGE_TYPE" not in mysettings.configdict["pkg"]:
if tree == "porttree":
+ mysettings.configdict["pkg"]["EMERGE_FROM"] = "ebuild"
mysettings.configdict["pkg"]["MERGE_TYPE"] = "source"
elif tree == "bintree":
+ mysettings.configdict["pkg"]["EMERGE_FROM"] = "binary"
mysettings.configdict["pkg"]["MERGE_TYPE"] = "binary"
if eapi_exports_replace_vars(mysettings["EAPI"]) and \