Respect lock configuration for prefix locks - #579
Conversation
|
style check is failing. Have they changed the line width in their upstream linter config? |
Oh. My bad. let me fix. Their fix came in another bigger PR where mine was smaller. Let me fix the style |
ceb4cf5 to
a7a7a46
Compare
|
Well, Terra pushed a change. Note I did ask it about cherry-picking from upstream but:
|
climbfuji
left a comment
There was a problem hiding this comment.
I don't see where the enable=True is eventually being used to turn on or off something, but my guess is that the receiver already had the enable option as an optional argument.
Summary
Adapts the relevant portion of upstream Spack spack#52270 (
de4dd3a422) to the older Spack revision currently pinned by spack-stack.When Spack is run with locks disabled, this revision still creates enabled per-spec prefix locks and failure-tracker locks. On our shared NFS filesystem, those lock attempts can fail with:
This change propagates
locks:enableto the prefix locker and failure tracker, allowing--disable-locksto disable these remaining installation-time locks.Why this is a targeted backport
Upstream spack#52270 is broader than this patch: it changes 11 files, including stage, environment transaction, repository, and cache locks, along with tests. It also uses newer lock-configuration APIs that do not exist in the
spack-stack-dev-based revision.A direct cherry-pick would therefore be conflict-prone and would pull in a larger, insufficiently tested change set. This PR ports only the two call paths responsible for the observed package-install failures.
The preferred long-term solution is to update spack-stack's pinned Spack revision; this focused compatibility patch is needed until then.
Upstream reference
--disable-locksspack/spack#52270Testing
Used the patched Spack for batch installs on Discover with locks disabled, where the previous per-package lock failures occurred.
AI assistance
GPT-5.6 Terra assisted in identifying the incomplete lock-disable propagation and preparing this targeted backport.