Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove deprecated --accept-eula option #4242

Merged
merged 1 commit into from
Apr 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions easybuild/tools/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,10 +568,6 @@ def init_build_options(build_options=None, cmdline_options=None):
_log.info("Auto-enabling ignoring of OS dependencies")
cmdline_options.ignore_osdeps = True

if not cmdline_options.accept_eula_for and cmdline_options.accept_eula:
_log.deprecated("Use accept-eula-for configuration setting rather than accept-eula.", '5.0')
cmdline_options.accept_eula_for = cmdline_options.accept_eula

cmdline_build_option_names = [k for ks in BUILD_OPTIONS_CMDLINE.values() for k in ks]
active_build_options.update(dict([(key, getattr(cmdline_options, key)) for key in cmdline_build_option_names]))
# other options which can be derived but have no perfectly matching cmdline option
Expand Down Expand Up @@ -609,9 +605,6 @@ def build_option(key, **kwargs):
build_options = BuildOptions()
if key in build_options:
return build_options[key]
elif key == 'accept_eula':
_log.deprecated("Use accept_eula_for build option rather than accept_eula.", '5.0')
return build_options['accept_eula_for']
elif 'default' in kwargs:
return kwargs['default']
else:
Expand Down
2 changes: 0 additions & 2 deletions easybuild/tools/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,6 @@ def override_options(self):
all_deprecations = ('python2', 'Lmod6', 'easyconfig', 'toolchain')

opts = OrderedDict({
'accept-eula': ("Accept EULA for specified software [DEPRECATED, use --accept-eula-for instead!]",
'strlist', 'store', []),
'accept-eula-for': ("Accept EULA for specified software", 'strlist', 'store', []),
'add-dummy-to-minimal-toolchains': ("Include dummy toolchain in minimal toolchain searches "
"[DEPRECATED, use --add-system-to-minimal-toolchains instead!]",
Expand Down
27 changes: 0 additions & 27 deletions test/framework/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -6466,34 +6466,7 @@ def test_accept_eula_for(self):

del os.environ['EASYBUILD_ACCEPT_EULA_FOR']

# also check deprecated --accept-eula configuration option
self.allow_deprecated_behaviour()

self.mock_stderr(True)
self.eb_main(args + ['--accept-eula=foo,toy,bar'], do_build=True, raise_error=True)
stderr = self.get_stderr()
self.mock_stderr(False)
self.assertIn("Use accept-eula-for configuration setting rather than accept-eula", stderr)

remove_dir(self.test_installpath)
self.assertNotExists(toy_modfile)

# also via $EASYBUILD_ACCEPT_EULA
self.mock_stderr(True)
os.environ['EASYBUILD_ACCEPT_EULA'] = 'toy'
self.eb_main(args, do_build=True, raise_error=True)
stderr = self.get_stderr()
self.mock_stderr(False)

self.assertExists(toy_modfile)
self.assertIn("Use accept-eula-for configuration setting rather than accept-eula", stderr)

remove_dir(self.test_installpath)
self.assertNotExists(toy_modfile)

# also check accepting EULA via 'accept_eula = True' in easyconfig file
self.disallow_deprecated_behaviour()
del os.environ['EASYBUILD_ACCEPT_EULA']
write_file(test_ec, test_ec_txt + '\naccept_eula = True')
self.eb_main(args, do_build=True, raise_error=True)
self.assertExists(toy_modfile)
Expand Down
2 changes: 1 addition & 1 deletion test/framework/sandbox/easybuild/easyblocks/t/toy_eula.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ def prepare_step(self, *args, **kwargs):
"""Constructor"""
super(EB_toy_eula, self).prepare_step(*args, **kwargs)

# EULA for toy must be accepted via --accept-eula EasyBuild configuration option,
# EULA for toy must be accepted via --accept-eula-for EasyBuild configuration option,
# or via 'accept_eula = True' in easyconfig file
self.check_accepted_eula(more_info='https://example.com/toy_eula.txt')