guix build: Fix relative file name canonicalization for '--root'.
Fixes <https://bugs.gnu.org/35271>. Reported by rendaw <7e9wc56emjakcm@s.rendaw.me>. * guix/scripts/build.scm (register-root): When ROOT is a relative file name, append the basename of ROOT, not ROOT itself. * tests/guix-build.sh: Add test.
This commit is contained in:
parent
cbd059d101
commit
4aea820f09
|
@ -119,7 +119,7 @@ found. Return #f if no build log was found."
|
|||
(let* ((root (if (string-prefix? "/" root)
|
||||
root
|
||||
(string-append (canonicalize-path (dirname root))
|
||||
"/" root))))
|
||||
"/" (basename root)))))
|
||||
(catch 'system-error
|
||||
(lambda ()
|
||||
(match paths
|
||||
|
|
|
@ -183,6 +183,13 @@ then false; else true; fi
|
|||
|
||||
rm -f "$result"
|
||||
|
||||
# Check relative file name canonicalization: <https://bugs.gnu.org/35271>.
|
||||
mkdir "$result"
|
||||
guix build -r "$result/x" -e '(@@ (gnu packages bootstrap) %bootstrap-guile)'
|
||||
test -x "$result/x/bin/guile"
|
||||
rm "$result/x"
|
||||
rmdir "$result"
|
||||
|
||||
# Cross building.
|
||||
guix build coreutils --target=mips64el-linux-gnu --dry-run --no-substitutes
|
||||
|
||||
|
|
Loading…
Reference in New Issue