This fixes conflicting behavior when EMERGE_DEFAULT_OPTS contains --autounmask=n.
X-Gentoo-bug: 619612 X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=619612 --- pym/_emerge/depgraph.py | 3 +++ pym/portage/tests/emerge/test_simple.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 726835dd4..92c519c6f 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -9463,6 +9463,9 @@ def backtrack_depgraph(settings, trees, myopts, myparams, def _backtrack_depgraph(settings, trees, myopts, myparams, myaction, myfiles, spinner): + if "--autounmask-continue" in myopts: + myopts["--autounmask"] = True + debug = "--debug" in myopts mydepgraph = None max_retries = myopts.get('--backtrack', 10) diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py index 5930f6cc8..1114dc053 100644 --- a/pym/portage/tests/emerge/test_simple.py +++ b/pym/portage/tests/emerge/test_simple.py @@ -311,7 +311,8 @@ pkg_preinst() { emerge_cmd + ("--unmerge", "--quiet", "dev-libs/A"), emerge_cmd + ("-C", "--quiet", "dev-libs/B"), - emerge_cmd + ("--autounmask-continue", "dev-libs/C",), + # --autounmask-continue overrides --autounmask=n + emerge_cmd + ("--autounmask=n", "--autounmask-continue", "dev-libs/C",), # Verify that the above --autounmask-continue command caused # USE=flag to be applied correctly to dev-libs/D. portageq_cmd + ("match", eroot, "dev-libs/D[flag]"), -- 2.13.0