-
Notifications
You must be signed in to change notification settings - Fork 12
keep builtin destination upon removing old builtin repo #152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| # Optionally, check out Spack's builtin package repo to a specific commit/branch/tag | ||
| if "spack_packages_url" in self.project_args: | ||
| url = self.project_args["spack_packages_url"] | ||
| spack_repo_add_cmd = f"{self.spack_exe()} repo add --name builtin {url}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it required to remove the existing builtin before we add it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would be curious to know as well. when i tried to remove it, i was getting an error that it doesn't exist. i tried both in the environment (-D spack_env) and without.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chapman39 what's the output of the following for you in the environment where you're getting the error that builtin doesn't exist?
$ spack debug report
$ spack config get reposThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it does appear to be there but won't let me delete it unless i set its destination.
[exe: git -c http.sslVerify=false clone --single-branch --depth=1 -b develop https://github.com/spack/spack.git spack]
Cloning into 'spack'...
Updating files: 100% (1734/1734), done.
[info: using spack commit 734c5db2121b01c373eed6538e452f18887e9e44]
[exe: git stash]
No local changes to save
[exe: git fetch --depth=1 origin 734c5db2121b01c373eed6538e452f18887e9e44]
From https://github.com/spack/spack
* branch 734c5db2121b01c373eed6538e452f18887e9e44 -> FETCH_HEAD
[exe: git checkout 734c5db2121b01c373eed6538e452f18887e9e44]
Note: switching to '734c5db2121b01c373eed6538e452f18887e9e44'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 734c5db Set the version to v1.0.2
[exe: /usr/WS2/meemee/serac/serac_tpls/toss_4_x86_64_ib_cray/2025_10_15_13_22_49/spack/bin/spack repo remove builtin]
==> Error: No repository with path or namespace: builtin
[ERROR: Failed to remove builtin package repository so it could be re-added with given URL]
[exe: /usr/WS2/meemee/serac/serac_tpls/toss_4_x86_64_ib_cray/2025_10_15_13_22_49/spack/bin/spack debug report]
* **Spack:** 1.0.2 (https://github.com/spack/spack/commit/734c5db2121b01c373eed6538e452f18887e9e44)
* **Builtin repo:** https://github.com/spack/spack-packages/commit/a75a7f75182ffc7a51c6ca7f0fec4bf9b2705be8
* **Python:** 3.9.12
* **Platform:** linux-rhel8-zen4
[exe: /usr/WS2/meemee/serac/serac_tpls/toss_4_x86_64_ib_cray/2025_10_15_13_22_49/spack/bin/spack config get repos]
repos:
builtin:
git: https://github.com/spack/spack-packages.git
branch: releases/v2025.07
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alecbcs let me know if there's anything else i should try
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@becker33 since you are back... we have been having a hard time getting this right and keep hitting odd behavior between people. Could you give advice on this?
the builtin repo's destination was being ignored due to the ordering of spack commands. this pr fixes that, so the destination is kept.
also does these changes in spack environment, so you can see the changes in the spack.yaml. for example
also removes this section since i think it only worked because the destination was set in the wrong order