diff options
authorZac Medico <zmedico@gentoo.org>2021-01-23 18:41:41 -0800
committerZac Medico <zmedico@gentoo.org>2021-02-07 20:22:54 -0800
commit3c587280434d7f36a45117ed0732362b9c49018f (patch)
tree8dc7aa484805f0c150b60f8bba4db23b4485c736 /lib/_emerge
parentemaint --fix merges: add -y, --yes option (diff)
emerge: disable --autounmask-license by default
Disable --autounmask-license by default, in order to limit user exposure to risks associated with package.license changes. The changes that this option suggests are only intended to be accepted when a user has made a conscious decision to accept the corresponding license(s). Creation of package.license changes introduces a risk that users may erroneously accept the changes due to some kind of accident or misunderstanding, rather than due to conscious decisions about licenses. These risks provide motivation to disable --autounmask-license by default. The --autounmask-use option will remain as the only autounmask option that is still enabled by default. The unit tests demonstrate interactions between --autounmask and --autounmask-license options. The --autounmask option enables --autounmask-license unless --autounmask-license=n has been specified. If --autounmask=n is used to disable autounmask, then --autounmask-license=y has no effect. Bug: https://bugs.gentoo.org/766773 Reviewed-by: Brian Dolbec <dolsen@gentoo.org> Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'lib/_emerge')
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/_emerge/create_depgraph_params.py b/lib/_emerge/create_depgraph_params.py
index 0d0e07b9c..25dd2a1b4 100644
--- a/lib/_emerge/create_depgraph_params.py
+++ b/lib/_emerge/create_depgraph_params.py
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
import logging
@@ -45,7 +45,7 @@ def create_depgraph_params(myopts, myaction):
autounmask_keep_masks = myopts.get("--autounmask-keep-masks")
autounmask = myopts.get("--autounmask")
- autounmask_license = myopts.get('--autounmask-license')
+ autounmask_license = myopts.get('--autounmask-license', 'y' if autounmask is True else 'n')
autounmask_use = myopts.get('--autounmask-use')
if autounmask == 'n':
autounmask = False
@@ -53,7 +53,7 @@ def create_depgraph_params(myopts, myaction):
if autounmask is None:
if autounmask_use in (None, 'y'):
autounmask = True
- elif autounmask_license in (None, 'y'):
+ if autounmask_license in ('y',):
autounmask = True
# Do not enable package.accept_keywords or package.mask
@@ -67,7 +67,7 @@ def create_depgraph_params(myopts, myaction):
myparams['autounmask'] = autounmask
myparams['autounmask_keep_use'] = True if autounmask_use == 'n' else False
- myparams['autounmask_keep_license'] = True if autounmask_license == 'n' else False
+ myparams['autounmask_keep_license'] = False if autounmask_license == 'y' else True
myparams['autounmask_keep_keywords'] = False if autounmask_keep_keywords in (None, 'n') else True
myparams['autounmask_keep_masks'] = False if autounmask_keep_masks in (None, 'n') else True