From a32cb18d45b90c86bf899b72649151b9ed6b7c65 Mon Sep 17 00:00:00 2001 From: Joris Rommelse <92474578+JorisRommelse@users.noreply.github.com> Date: Sat, 4 Oct 2025 14:03:58 +0200 Subject: [PATCH 1/5] Update easyblock.py --- easybuild/framework/easyblock.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index dd7f65fc37..1b7d352511 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -830,6 +830,21 @@ def collect_exts_file_info(self, fetch_files=True, verify_checksums=True): def obtain_file(self, filename, extension=False, urls=None, download_filename=None, force_download=False, git_config=None, no_download=False, download_instructions=None, alt_location=None, warning_only=False): + try: + return self.obtain_file_and_fail(filename, extension, urls, download_filename, force_download, git_config, no_download, download_instructions, alt_location, warning_only) + except Exception as e: + if build_option('fetch_continue'): + if not urls: + urls = ['NO_URL'] + print_warning(f"FAILED: File {filename} not found from {urls[0]}. Continuing ...") + return 'NO_FILE_FOUND' + else: + raise + + @_obtain_file_update_progress_bar_on_return + def obtain_file_and_fail(self, filename, extension=False, urls=None, download_filename=None, force_download=False, + git_config=None, no_download=False, download_instructions=None, alt_location=None, + warning_only=False): """ Locate the file with the given name - searches in different subdirectories of source path From fa679b65759e57354de63393dcb4e08302f2e97d Mon Sep 17 00:00:00 2001 From: Joris Rommelse <92474578+JorisRommelse@users.noreply.github.com> Date: Sat, 4 Oct 2025 14:14:22 +0200 Subject: [PATCH 2/5] Update main.py --- easybuild/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/main.py b/easybuild/main.py index 929e26f1a4..5d45c7a9ca 100755 --- a/easybuild/main.py +++ b/easybuild/main.py @@ -586,7 +586,7 @@ def process_eb_args(eb_args, eb_go, cfg_settings, modtool, testing, init_session # build software, will exit when errors occurs (except when testing) if not testing or (testing and do_build): - exit_on_failure = not (options.dump_test_report or options.upload_test_report) + exit_on_failure = not (options.dump_test_report or options.upload_test_report or build_option('fetch_continue')) with rich_live_cm(): run_hook(PRE_PREF + BUILD_AND_INSTALL_LOOP, hooks, args=[ordered_ecs]) From 5e36a20cad5406324471d858b7c630c20a19b07e Mon Sep 17 00:00:00 2001 From: Joris Rommelse <92474578+JorisRommelse@users.noreply.github.com> Date: Sat, 4 Oct 2025 14:15:34 +0200 Subject: [PATCH 3/5] Update config.py --- easybuild/tools/config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/tools/config.py b/easybuild/tools/config.py index db667d5110..ee4e9361aa 100644 --- a/easybuild/tools/config.py +++ b/easybuild/tools/config.py @@ -318,6 +318,7 @@ def mk_full_default_path(name, prefix=DEFAULT_PREFIX): 'experimental', 'extended_dry_run', 'fail_on_mod_files_gcccore', + 'fetch_continue', 'force', 'generate_devel_module', 'group_writable_installdir', From 301c5eaf76fd5fc76e0992c59f093dc01adcb7cc Mon Sep 17 00:00:00 2001 From: Joris Rommelse <92474578+JorisRommelse@users.noreply.github.com> Date: Sat, 4 Oct 2025 14:17:29 +0200 Subject: [PATCH 4/5] Update options.py --- easybuild/tools/options.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/easybuild/tools/options.py b/easybuild/tools/options.py index 4114647dfc..a4096031bc 100644 --- a/easybuild/tools/options.py +++ b/easybuild/tools/options.py @@ -464,6 +464,7 @@ def override_options(self): False), 'fetch': ("Allow downloading sources ignoring OS and modules tool dependencies, " "implies --stop=fetch, --ignore-osdeps and ignore modules tool", None, 'store_true', False), + 'fetch-continue': ("Continue after failed fetch", None, 'store_true', False), 'filter-deps': ("List of dependencies that you do *not* want to install with EasyBuild, " "because equivalent OS packages are installed. (e.g. --filter-deps=zlib,ncurses)", 'strlist', 'extend', None), @@ -1359,6 +1360,8 @@ def _postprocess_config(self): self.options.search_paths = [os.path.abspath(path) for path in self.options.search_paths] # Fetch option implies stop=fetch, no moduletool and ignore-osdeps + if self.options.fetch_continue: + self.options.fetch = True if self.options.fetch: self.options.stop = FETCH_STEP self.options.ignore_locks = True From 10d69c30f8a54d3c76d6c84a47f77ace6c150be1 Mon Sep 17 00:00:00 2001 From: rommelse <69961165+rommelse@users.noreply.github.com> Date: Sat, 4 Oct 2025 15:25:05 +0200 Subject: [PATCH 5/5] Update easyblock.py --- easybuild/framework/easyblock.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index 1b7d352511..c3400dcff5 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -831,8 +831,9 @@ def obtain_file(self, filename, extension=False, urls=None, download_filename=No git_config=None, no_download=False, download_instructions=None, alt_location=None, warning_only=False): try: - return self.obtain_file_and_fail(filename, extension, urls, download_filename, force_download, git_config, no_download, download_instructions, alt_location, warning_only) - except Exception as e: + return self.obtain_file_and_fail(filename, extension, urls, download_filename, force_download, git_config, + no_download, download_instructions, alt_location, warning_only) + except Exception: if build_option('fetch_continue'): if not urls: urls = ['NO_URL'] @@ -843,8 +844,8 @@ def obtain_file(self, filename, extension=False, urls=None, download_filename=No @_obtain_file_update_progress_bar_on_return def obtain_file_and_fail(self, filename, extension=False, urls=None, download_filename=None, force_download=False, - git_config=None, no_download=False, download_instructions=None, alt_location=None, - warning_only=False): + git_config=None, no_download=False, download_instructions=None, alt_location=None, + warning_only=False): """ Locate the file with the given name - searches in different subdirectories of source path