From: Zac Medico Date: Sun, 5 Dec 2010 11:08:54 +0000 (-0800) Subject: Sync EMERGE_FROM code with MERGE_TYPE code. X-Git-Tag: v2.1.9.26~35 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1d5d1fb05c85ed4386f041bcbd7d8fbe6f7e6e13;p=portage.git Sync EMERGE_FROM code with MERGE_TYPE code. --- 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 d241bc74b..135f5c95e 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 183a922f9..87dcfcb14 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) 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 \