Sync EMERGE_FROM code with MERGE_TYPE code.
authorZac Medico <zmedico@gentoo.org>
Sun, 5 Dec 2010 11:08:54 +0000 (03:08 -0800)
committerZac Medico <zmedico@gentoo.org>
Sun, 5 Dec 2010 11:09:50 +0000 (03:09 -0800)
pym/_emerge/Binpkg.py
pym/_emerge/EbuildBuild.py
pym/_emerge/Scheduler.py
pym/portage/package/ebuild/doebuild.py

index 9279fa39a98d64139f328b5c35dbb984eb243cfa..8b93a2dfb49a6f8b52b8d6215132d0c4dda9dbe0 100644 (file)
@@ -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
index d241bc74be2caef2a3ed78abe8b10047ac28f0b3..135f5c95e461e9dc424a428987a5934082f33168 100644 (file)
@@ -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:
index 183a922f92024b904e3a11b21b1771ce48b558a8..87dcfcb1436a5c79fa1a908c9c43a18f393047d9 100644 (file)
@@ -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:
index ba0a5783674aa6228749a58ca2bd60349c500e29..5bba19ff84d655fd9ae81c11942f645b084fb904 100644 (file)
@@ -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 \