@@ -65,15 +65,17 @@ def inject_prerelease_information(
6565 updated_manifest , root_spec_name , version
6666 )
6767
68+ if spack_packages_path :
69+ # Add the 'repo:' section for prerelease spack packages if provided
70+ updated_manifest = add_prerelease_repos_section (
71+ updated_manifest , spack_packages_path
72+ )
73+
6874 # Dump the current dict, and add the non-standard 'repo::' section
6975 manifest_str : str = yaml .dump (
7076 updated_manifest , default_flow_style = False , sort_keys = False
7177 )
7278
73- if spack_packages_path :
74- # Add the 'repo::' section for prerelease spack packages if provided
75- manifest_str = add_prerelease_repos_section (manifest_str , spack_packages_path )
76-
7779 return manifest_str
7880
7981
@@ -138,14 +140,19 @@ def update_root_spec_projection_version(
138140 return manifest
139141
140142
141- def add_prerelease_repos_section (manifest_str : str , spack_packages_path : str ) -> str :
142- manifest_str += (
143- f" repos::\n "
144- f" - { spack_packages_path } \n "
145- f" - $spack/var/spack/repos/builtin\n "
146- )
143+ def add_prerelease_repos_section (
144+ manifest : dict [str , Any ], spack_packages_path : str
145+ ) -> dict [str , Any ]:
147146
148- return manifest_str
147+ manifest .setdefault ("spack" , {}).setdefault ("repos" , {})
148+ manifest ["spack" ]["repos" ] = {
149+ "access_spack_packages" : {
150+ "git" : "https://github.com/ACCESS-NRI/access-spack-packages.git" ,
151+ "destination" : spack_packages_path ,
152+ }
153+ }
154+
155+ return manifest
149156
150157
151158def parse_args (args : list [str ]) -> argparse .Namespace :
0 commit comments