guix_mirror_bot pushed a commit to branch core-packages-team in repository guix.
commit 19ce95a862071469b3154d4690fdd81d85103df0 Author: Zheng Junjie <[email protected]> AuthorDate: Tue Jul 21 13:48:46 2026 +0800 gnu: glibc: Skip the substitute when the input does not contain bash * gnu/packages/base.scm (glibc)[arguments]: Adjust pre-configure phase. --- gnu/packages/base.scm | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 2d4966fa00..a3b5e10c63 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -1073,22 +1073,25 @@ the store.") (("@STORE_DIRECTORY@") (string-append "\"" (%store-directory) "\""))) - ;; Have `system' use that Bash. - (substitute* "sysdeps/posix/system.c" - (("#define[[:blank:]]+SHELL_PATH.*$") - (format #f "#define SHELL_PATH \"~a/bin/bash\"\n" bash))) - - ;; Same for `popen'. - (substitute* "libio/iopopen.c" - (("/bin/sh") - (string-append bash "/bin/sh"))) - - ;; Same for the shell used by the 'exec' functions for - ;; scripts that lack a shebang. - (substitute* (find-files "." "^paths\\.h$") - (("#define[[:blank:]]+_PATH_BSHELL[[:blank:]].*$") - (string-append "#define _PATH_BSHELL \"" - bash "/bin/sh\"\n"))) + ;; In the glibc-cross-target-intermediate, there is no need to + ;; modify bash, so we can skip this part. + (when bash + ;; Have `system' use that Bash. + (substitute* "sysdeps/posix/system.c" + (("#define[[:blank:]]+SHELL_PATH.*$") + (format #f "#define SHELL_PATH \"~a/bin/bash\"\n" bash))) + + ;; Same for `popen'. + (substitute* "libio/iopopen.c" + (("/bin/sh") + (string-append bash "/bin/sh"))) + + ;; Same for the shell used by the 'exec' functions for + ;; scripts that lack a shebang. + (substitute* (find-files "." "^paths\\.h$") + (("#define[[:blank:]]+_PATH_BSHELL[[:blank:]].*$") + (string-append "#define _PATH_BSHELL \"" + bash "/bin/sh\"\n")))) ;; Make sure we don't retain a reference to the ;; bootstrap Perl.
