diff options
-rw-r--r-- | pym/_emerge/EbuildBuild.py | 2 | ||||
-rw-r--r-- | pym/_emerge/actions.py | 3 | ||||
-rw-r--r-- | pym/_emerge/main.py | 8 |
3 files changed, 9 insertions, 4 deletions
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. |