From 03cb30cb961fa2b74bb0b16071cd06d7a2940756 Mon Sep 17 00:00:00 2001 From: Scott Wittenburg Date: Thu, 8 May 2025 17:25:35 -0600 Subject: [PATCH] binary_distribution: Do not look in sub-mirrors when indexing (#50389) When indexing top level specs, eg, in s3://spack-binaries/develop, do not sync manifests from all the stacks. Instead, add the path to the spec manifests to the url to sync, so that only items in s3://spack-binaries/develop/v3/manifests/spec are copied to the local system. --- lib/spack/spack/binary_distribution.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py index 90a54f49390..6d9d2a9f83c 100644 --- a/lib/spack/spack/binary_distribution.py +++ b/lib/spack/spack/binary_distribution.py @@ -754,6 +754,7 @@ def file_read_method(manifest_path): cache_entry.destroy() return spec_dict + url_to_list = url_util.join(url, buildcache_relative_specs_url()) sync_command_args = [ "s3", "sync", @@ -761,11 +762,11 @@ def file_read_method(manifest_path): "*", "--include", "*.spec.manifest.json", - url, + url_to_list, tmpspecsdir, ] - tty.debug(f"Using aws s3 sync to download manifests from {url} to {tmpspecsdir}") + tty.debug(f"Using aws s3 sync to download manifests from {url_to_list} to {tmpspecsdir}") try: aws(*sync_command_args, output=os.devnull, error=os.devnull)