From: Zac Medico Date: Wed, 31 Aug 2011 02:31:48 +0000 (-0700) Subject: Respect package.env buildpkg FEATURES settings. X-Git-Tag: v2.2.0_alpha52~20 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c47394cb28a841d5b7399f548c2507a85a158bdd;p=portage.git Respect package.env buildpkg FEATURES settings. This will fix bug #318897. --- diff --git a/pym/_emerge/EbuildBuild.py b/pym/_emerge/EbuildBuild.py index 0144cfc72..2b0f41209 100644 --- a/pym/_emerge/EbuildBuild.py +++ b/pym/_emerge/EbuildBuild.py @@ -225,7 +225,7 @@ class EbuildBuild(CompositeTask): system_set.findAtomForPackage(pkg) and \ not opts.buildpkg - if opts.buildpkg or self._issyspkg: + if opts.buildpkg or "buildpkg" in features or self._issyspkg: self._buildpkg = True diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index 882a2db42..3477c19d8 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -2731,6 +2731,9 @@ def adjust_config(myopts, settings): settings["EMERGE_WARNING_DELAY"] = str(EMERGE_WARNING_DELAY) settings.backup_changes("EMERGE_WARNING_DELAY") + if "--buildpkg" in myopts: + settings.features.add("buildpkg") + if "--quiet" in myopts or "--quiet-build" in myopts: settings["PORTAGE_QUIET"]="1" settings.backup_changes("PORTAGE_QUIET") diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index 84c4c58b8..343fd5812 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -1545,6 +1545,11 @@ def emerge_main(args=None): settings, trees, mtimedb = load_emerge_config(trees=trees) portdb = trees[settings["ROOT"]]["porttree"].dbapi + # NOTE: adjust_configs() can map options to FEATURES, so any relevant + # options adjustments should be made prior to calling adjust_configs(). + if "--buildpkgonly" in myopts: + myopts["--buildpkg"] = True + adjust_configs(myopts, trees) apply_priorities(settings) @@ -1587,9 +1592,6 @@ def emerge_main(args=None): if "--usepkgonly" in myopts: myopts["--usepkg"] = True - if "buildpkg" in settings.features or "--buildpkgonly" in myopts: - myopts["--buildpkg"] = True - if "--buildpkgonly" in myopts: # --buildpkgonly will not merge anything, so # it cancels all binary package options.