File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,22 +66,16 @@ def download_tarball(package):
6666 Download binary tarball for given package into stage area
6767 Return True if successful
6868 """
69- try :
70- download_url = os .environ ["SPACK_DOWNLOAD_URL" ]
71- except KeyError :
72- tty .die ("Please set the SPACK_DOWNLOAD_URL environment variable for downloading pre-compiled packages." )
73-
74- tarball = tarball_name (package .spec )
75- remote_tarball = os .path .join (download_url , tarball )
76-
69+ if len (spack .config .get_config ('mirrors' )) == 0 :
70+ tty .die ("Please add a spack mirror to allow download of pre-compiled packages." )
71+
7772 # stage the tarball into standard place
78- # TODO: may make this a part of the package class
79- stage = Stage (remote_tarball ,name = package .stage .path )
73+ tarball = tarball_name ( package . spec )
74+ stage = Stage (tarball ,name = package .stage .path , mirror_path = tarball )
8075 try :
81- stage .fetch ()
76+ stage .fetch (mirror_only = True )
8277 return True
8378 except fs .FetchError :
84- tty .warn ("No binary package for %s found." % package .name )
8579 return False
8680
8781def extract_tarball (package ):
Original file line number Diff line number Diff line change @@ -889,8 +889,8 @@ def do_install(self,
889889 elif install_policy == "download" :
890890 tty .die ("Download of binary package for %s failed." % self .name )
891891 else :
892- pass
893-
892+ tty . warn ( "No binary package for %s found." % self . name )
893+
894894 if not fake and not install_binary :
895895 if not skip_patch :
896896 self .do_patch ()
You can’t perform that action at this time.
0 commit comments