File tree Expand file tree Collapse file tree 3 files changed +9
-11
lines changed
Expand file tree Collapse file tree 3 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -227,13 +227,13 @@ def generate(self, recipe):
227227 with (self .path / "Makefile" ).open ("w" ) as f :
228228 f .write (
229229 makefile_template .render (
230- cache = recipe .cache ,
231230 modules = recipe .with_modules ,
232231 post_install_hook = recipe .post_install_hook ,
233232 pre_install_hook = recipe .pre_install_hook ,
234233 spack_version = spack_version ,
235234 spack_meta = spack_meta ,
236- mirrors = recipe .mirrors .mirrors ,
235+ gpg_keys = recipe .mirrors .keys ,
236+ cache = recipe .mirrors .buildcache ,
237237 exclude_from_cache = ["nvhpc" , "cuda" , "perl" ],
238238 verbose = False ,
239239 )
Original file line number Diff line number Diff line change @@ -173,9 +173,12 @@ def _create_spack_mirrors_yaml(self, dest: pathlib.Path):
173173 raw = {"mirrors" : {}}
174174
175175 for name , mirror in self .mirrors .items ():
176- name = mirror ["name" ]
177176 url = mirror ["url" ]
178177
178+ # Make the mirror path specific to the mount point
179+ if mirror ['mount_specific' ] and self ._mount_point is not None :
180+ url = url .rstrip ('/' ) + '/' + self ._mount_point .as_posix ().lstrip ('/' )
181+
179182 raw ["mirrors" ][name ] = {
180183 "fetch" : {"url" : url },
181184 "push" : {"url" : url },
Original file line number Diff line number Diff line change @@ -33,19 +33,14 @@ pre-install: spack-setup
3333
3434mirror-setup : spack-setup{% if pre_install_hook % } pre-install{% endif % }
3535
36- {% if cache %}
36+ @echo "Pulling and trusting keys from configured buildcaches."
3737 $(SANDBOX) $(SPACK) buildcache keys --install --trust
38- {% endif %}
39- {% if mirrors %}
4038 @echo "Adding mirror gpg keys."
41- {% for mirror in mirrors | reverse %}
42- {% if mirror.public_key %}
43- $(SANDBOX) $(SPACK) gpg trust {{ mirror.public_key }}
44- {% endif %}
39+ {% for key_path in gpg_keys %}
40+ $(SANDBOX) $(SPACK) gpg trust {{ key_path }}
4541 {% endfor %}
4642 @echo "Current mirror list:"
4743 $(SANDBOX) $(SPACK) mirror list
48- {% endif %}
4944 touch mirror-setup
5045
5146compilers : mirror-setup
You can’t perform that action at this time.
0 commit comments