def adjust_config(myopts, settings):
"""Make emerge specific adjustments to the config."""
- # To enhance usability, make some vars case insensitive by forcing them to
- # lower case.
- for myvar in ("AUTOCLEAN", "NOCOLOR"):
- if myvar in settings:
- settings[myvar] = settings[myvar].lower()
- settings.backup_changes(myvar)
- del myvar
-
# Kill noauto as it will break merges otherwise.
if "noauto" in settings.features:
settings.features.remove('noauto')
('ACCEPT_PROPERTIES', '*'),
)
+ # To enhance usability, make some vars case insensitive
+ # by forcing them to lower case.
+ _case_insensitive_vars = ('AUTOCLEAN', 'NOCOLOR',)
+
def __init__(self, clone=None, mycpv=None, config_profile_path=None,
config_incrementals=None, config_root=None, target_root=None,
local_config=True, env=None):
self._init_dirs()
+ for k in self._case_insensitive_vars:
+ if k in self:
+ self[k] = self[k].lower()
+ self.backup_changes(k)
+
if mycpv:
self.setcpv(mycpv)