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.
This commit is contained in:
parent
f6da037129
commit
03cb30cb96
@ -754,6 +754,7 @@ def file_read_method(manifest_path):
|
|||||||
cache_entry.destroy()
|
cache_entry.destroy()
|
||||||
return spec_dict
|
return spec_dict
|
||||||
|
|
||||||
|
url_to_list = url_util.join(url, buildcache_relative_specs_url())
|
||||||
sync_command_args = [
|
sync_command_args = [
|
||||||
"s3",
|
"s3",
|
||||||
"sync",
|
"sync",
|
||||||
@ -761,11 +762,11 @@ def file_read_method(manifest_path):
|
|||||||
"*",
|
"*",
|
||||||
"--include",
|
"--include",
|
||||||
"*.spec.manifest.json",
|
"*.spec.manifest.json",
|
||||||
url,
|
url_to_list,
|
||||||
tmpspecsdir,
|
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:
|
try:
|
||||||
aws(*sync_command_args, output=os.devnull, error=os.devnull)
|
aws(*sync_command_args, output=os.devnull, error=os.devnull)
|
||||||
|
Loading…
Reference in New Issue
Block a user