Timothy Sample <samp...@ngyro.com> writes: > Kyle Meyer <k...@kyleam.com> writes:
[...] >> Perhaps I'm just missing something, but to spell out my concern a >> little >> more: I have /gnu/store/A/git-annex and /gnu/store/X/bash-minimal. I >> set up a repo with 'git annex init', and >> /gnu/store/X/bash-minimal/bin/sh is used in the shebang. >> >> Some time later I am using /gnu/store/B/git-annex, which references >> /gnu/store/Y/bash-minimal. That repo's hook still uses the >> X/bash-minimal/bin/sh. But if /gnu/store/X/bash-minimal is no longer >> referenced by any package, it could be garbage collected, leading to >> the >> hook failing. > > Ah yes! That could be a problem indeed. Good catch. Following the > example of autoconf, it seems it should just be left alone. Revisiting this, I tried to simply remove the patch-shell phase (diff below). That worked as intended when I tested manually, but it caused many test failures with messages like fatal: cannot run .git/hooks/pre-commit: No such file or directory Although the error message isn't too clear, this happens because /bin/sh, now used in the hook shebangs, isn't available to the tests executed in the build environment. Any suggestions on how to deal with this? --- diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index dc2abb0c71..56fe6f5e7a 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -2236,11 +2236,6 @@ (define-public git-annex '("--flags=-Android -Assistant -Pairing -S3 -Webapp -WebDAV") #:phases (modify-phases %standard-phases - (add-before 'configure 'patch-shell - (lambda _ - (substitute* "Utility/Shell.hs" - (("/bin/sh") (which "sh"))) - #t)) (add-before 'configure 'factor-setup (lambda _ ;; Factor out necessary build logic from the provided