4040import spack .hash_types as ht
4141import spack .hooks
4242import spack .hooks .sbang
43- import spack .mirror
43+ import spack .mirrors . mirror
4444import spack .oci .image
4545import spack .oci .oci
4646import spack .oci .opener
@@ -369,7 +369,7 @@ def update(self, with_cooldown=False):
369369 on disk under ``_index_cache_root``)."""
370370 self ._init_local_index_cache ()
371371 configured_mirror_urls = [
372- m .fetch_url for m in spack .mirror .MirrorCollection (binary = True ).values ()
372+ m .fetch_url for m in spack .mirrors . mirror .MirrorCollection (binary = True ).values ()
373373 ]
374374 items_to_remove = []
375375 spec_cache_clear_needed = False
@@ -1176,7 +1176,7 @@ def _url_upload_tarball_and_specfile(
11761176
11771177
11781178class Uploader :
1179- def __init__ (self , mirror : spack .mirror .Mirror , force : bool , update_index : bool ):
1179+ def __init__ (self , mirror : spack .mirrors . mirror .Mirror , force : bool , update_index : bool ):
11801180 self .mirror = mirror
11811181 self .force = force
11821182 self .update_index = update_index
@@ -1224,7 +1224,7 @@ def tag(self, tag: str, roots: List[spack.spec.Spec]):
12241224class OCIUploader (Uploader ):
12251225 def __init__ (
12261226 self ,
1227- mirror : spack .mirror .Mirror ,
1227+ mirror : spack .mirrors . mirror .Mirror ,
12281228 force : bool ,
12291229 update_index : bool ,
12301230 base_image : Optional [str ],
@@ -1273,7 +1273,7 @@ def tag(self, tag: str, roots: List[spack.spec.Spec]):
12731273class URLUploader (Uploader ):
12741274 def __init__ (
12751275 self ,
1276- mirror : spack .mirror .Mirror ,
1276+ mirror : spack .mirrors . mirror .Mirror ,
12771277 force : bool ,
12781278 update_index : bool ,
12791279 signing_key : Optional [str ],
@@ -1297,7 +1297,7 @@ def push(
12971297
12981298
12991299def make_uploader (
1300- mirror : spack .mirror .Mirror ,
1300+ mirror : spack .mirrors . mirror .Mirror ,
13011301 force : bool = False ,
13021302 update_index : bool = False ,
13031303 signing_key : Optional [str ] = None ,
@@ -1953,9 +1953,9 @@ def download_tarball(spec, unsigned: Optional[bool] = False, mirrors_for_spec=No
19531953 "signature_verified": "true-if-binary-pkg-was-already-verified"
19541954 }
19551955 """
1956- configured_mirrors : Iterable [spack .mirror .Mirror ] = spack . mirror . MirrorCollection (
1957- binary = True
1958- ). values ()
1956+ configured_mirrors : Iterable [spack .mirrors . mirror .Mirror ] = (
1957+ spack . mirrors . mirror . MirrorCollection ( binary = True ). values ()
1958+ )
19591959 if not configured_mirrors :
19601960 tty .die ("Please add a spack mirror to allow download of pre-compiled packages." )
19611961
@@ -1980,7 +1980,7 @@ def fetch_url_to_mirror(url):
19801980 for mirror in configured_mirrors :
19811981 if mirror .fetch_url == url :
19821982 return mirror
1983- return spack .mirror .Mirror (url )
1983+ return spack .mirrors . mirror .Mirror (url )
19841984
19851985 mirrors = [fetch_url_to_mirror (url ) for url in mirror_urls ]
19861986
@@ -2650,7 +2650,7 @@ def try_direct_fetch(spec, mirrors=None):
26502650 specfile_is_signed = False
26512651 found_specs = []
26522652
2653- binary_mirrors = spack .mirror .MirrorCollection (mirrors = mirrors , binary = True ).values ()
2653+ binary_mirrors = spack .mirrors . mirror .MirrorCollection (mirrors = mirrors , binary = True ).values ()
26542654
26552655 for mirror in binary_mirrors :
26562656 buildcache_fetch_url_json = url_util .join (
@@ -2711,7 +2711,7 @@ def get_mirrors_for_spec(spec=None, mirrors_to_check=None, index_only=False):
27112711 if spec is None :
27122712 return []
27132713
2714- if not spack .mirror .MirrorCollection (mirrors = mirrors_to_check , binary = True ):
2714+ if not spack .mirrors . mirror .MirrorCollection (mirrors = mirrors_to_check , binary = True ):
27152715 tty .debug ("No Spack mirrors are currently configured" )
27162716 return {}
27172717
@@ -2750,7 +2750,7 @@ def clear_spec_cache():
27502750
27512751def get_keys (install = False , trust = False , force = False , mirrors = None ):
27522752 """Get pgp public keys available on mirror with suffix .pub"""
2753- mirror_collection = mirrors or spack .mirror .MirrorCollection (binary = True )
2753+ mirror_collection = mirrors or spack .mirrors . mirror .MirrorCollection (binary = True )
27542754
27552755 if not mirror_collection :
27562756 tty .die ("Please add a spack mirror to allow " + "download of build caches." )
@@ -2805,7 +2805,7 @@ def get_keys(install=False, trust=False, force=False, mirrors=None):
28052805
28062806
28072807def _url_push_keys (
2808- * mirrors : Union [spack .mirror .Mirror , str ],
2808+ * mirrors : Union [spack .mirrors . mirror .Mirror , str ],
28092809 keys : List [str ],
28102810 tmpdir : str ,
28112811 update_index : bool = False ,
@@ -2872,7 +2872,7 @@ def check_specs_against_mirrors(mirrors, specs, output_file=None):
28722872
28732873 """
28742874 rebuilds = {}
2875- for mirror in spack .mirror .MirrorCollection (mirrors , binary = True ).values ():
2875+ for mirror in spack .mirrors . mirror .MirrorCollection (mirrors , binary = True ).values ():
28762876 tty .debug ("Checking for built specs at {0}" .format (mirror .fetch_url ))
28772877
28782878 rebuild_list = []
@@ -2916,7 +2916,7 @@ def _download_buildcache_entry(mirror_root, descriptions):
29162916
29172917
29182918def download_buildcache_entry (file_descriptions , mirror_url = None ):
2919- if not mirror_url and not spack .mirror .MirrorCollection (binary = True ):
2919+ if not mirror_url and not spack .mirrors . mirror .MirrorCollection (binary = True ):
29202920 tty .die (
29212921 "Please provide or add a spack mirror to allow " + "download of buildcache entries."
29222922 )
@@ -2925,7 +2925,7 @@ def download_buildcache_entry(file_descriptions, mirror_url=None):
29252925 mirror_root = os .path .join (mirror_url , BUILD_CACHE_RELATIVE_PATH )
29262926 return _download_buildcache_entry (mirror_root , file_descriptions )
29272927
2928- for mirror in spack .mirror .MirrorCollection (binary = True ).values ():
2928+ for mirror in spack .mirrors . mirror .MirrorCollection (binary = True ).values ():
29292929 mirror_root = os .path .join (mirror .fetch_url , BUILD_CACHE_RELATIVE_PATH )
29302930
29312931 if _download_buildcache_entry (mirror_root , file_descriptions ):
0 commit comments