Skip to content

Multiple package repos in config.yaml#294

Open
msimberg wants to merge 13 commits into
eth-cscs:mainfrom
msimberg:multiple-package-repos
Open

Multiple package repos in config.yaml#294
msimberg wants to merge 13 commits into
eth-cscs:mainfrom
msimberg:multiple-package-repos

Conversation

@msimberg
Copy link
Copy Markdown
Collaborator

Extends config.yaml to accept not only

...
    packages:
        repo: https://github.com/foo/spack-packages.git
        commit: abcdef

but also multiple repos:

...
    packages:
        myrepo:
            repo: https://github.com/bar/other-packages.git
            commit: fedcba
            path: path/to/repo
        builtin:
            repo: https://github.com/foo/spack-packages.git
            commit: abcdef

Order of repos is significant in the same way it's significant in spack config files (https://spack.readthedocs.io/en/latest/repositories.html#search-order-and-overriding-packages). Packages from repos higher up on the list take precedence.

I made a small change so that there are also two implicit repos (currently on main there's one: alps). A repo recipe exists if and only if there are packages in the recipe. alps still exists, but doesn't have the recipe packages. The example above would produce the following list of repos:

  • recipe
  • alps
  • myrepo
  • builtin

Currently there's no enforcement that the repo entry has the same name as the repo namespace (similar to spack itself, if I understand it correctly). Is this ok?

There's an optional path property that can be used to point to a non-default subdirectory within the cloned git repo. For spack-packages this is always in repos/spack_repo/builtin, so the default is repos/spack_repo/{name}. In spack-packages there is an index file https://github.com/spack/spack-packages/blob/develop/spack-repo-index.yaml which could be used to locate all the package repos within a git repo. Spack uses this when it clones package repos through git. For now I decided it's overkill to support that. Thoughts?

@msimberg msimberg requested review from albestro and bcumming May 20, 2026 07:44
@msimberg msimberg marked this pull request as ready for review May 20, 2026 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant