mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
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
2 changed files with 8 additions and 1 deletions
|
@ -119,7 +119,7 @@ (define (register-root store paths root)
|
|||
(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 a new issue