aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2019-10-10 20:58:15 -0700
committerZac Medico <zmedico@gentoo.org>2019-10-14 15:26:58 -0700
commit979f9f47cce27092e528321ccafd7a649adbc7b3 (patch)
treef44844b40f124cff3900d06b56832854a35e5fff /lib/_emerge/depgraph.py
parentget_mirror_url: do not cache after ConfigParserError (diff)
downloadportage-979f9f47cce27092e528321ccafd7a649adbc7b3.tar.gz
portage-979f9f47cce27092e528321ccafd7a649adbc7b3.tar.bz2
portage-979f9f47cce27092e528321ccafd7a649adbc7b3.zip
Default disable autounmask package.accept_keywords/mask changes (bug 658648)
Add emerge --autounmask-license and --autounmask-use options which are enabled by default, and disable package.accept_keywords/mask changes by default. For backward compatibility, previous behavior of --autounmask=y and --autounmask=n is entirely preserved. Users can get the old behavior simply by adding --autounmask to the make.conf EMERGE_DEFAULT_OPTS variable. Bug: https://bugs.gentoo.org/658648 Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'lib/_emerge/depgraph.py')
-rw-r--r--lib/_emerge/depgraph.py20
1 files changed, 12 insertions, 8 deletions
diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py
index 51614fc14..a641bfc21 100644
--- a/lib/_emerge/depgraph.py
+++ b/lib/_emerge/depgraph.py
@@ -495,7 +495,7 @@ class _dynamic_depgraph_config(object):
self._backtrack_infos = {}
self._buildpkgonly_deps_unsatisfied = False
- self._autounmask = depgraph._frozen_config.myopts.get('--autounmask') != 'n'
+ self._autounmask = self.myparams['autounmask']
self._displayed_autounmask = False
self._success_without_autounmask = False
self._autounmask_backtrack_disabled = False
@@ -5907,15 +5907,19 @@ class depgraph(object):
if self._dynamic_config._autounmask is not True:
return
- autounmask_keep_keywords = self._frozen_config.myopts.get("--autounmask-keep-keywords", "n") != "n"
- autounmask_keep_masks = self._frozen_config.myopts.get("--autounmask-keep-masks", "n") != "n"
+ autounmask_keep_keywords = self._dynamic_config.myparams['autounmask_keep_keywords']
+ autounmask_keep_license = self._dynamic_config.myparams['autounmask_keep_license']
+ autounmask_keep_masks = self._dynamic_config.myparams['autounmask_keep_masks']
+ autounmask_keep_use = self._dynamic_config.myparams['autounmask_keep_use']
autounmask_level = self._AutounmaskLevel()
- autounmask_level.allow_use_changes = True
- yield autounmask_level
+ if not autounmask_keep_use:
+ autounmask_level.allow_use_changes = True
+ yield autounmask_level
- autounmask_level.allow_license_changes = True
- yield autounmask_level
+ if not autounmask_keep_license:
+ autounmask_level.allow_license_changes = True
+ yield autounmask_level
if not autounmask_keep_keywords:
autounmask_level.allow_unstable_keywords = True
@@ -9835,7 +9839,7 @@ def _backtrack_depgraph(settings, trees, myopts, myparams, myaction, myfiles, sp
"\n\nautounmask breakage detected\n\n",
noiselevel=-1, level=logging.DEBUG)
mydepgraph.display_problems()
- myopts["--autounmask"] = "n"
+ myparams["autounmask"] = False
mydepgraph = depgraph(settings, trees, myopts, myparams, spinner,
frozen_config=frozen_config, allow_backtracking=False)
success, favorites = mydepgraph.select_files(myfiles)