summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix/scripts/build.scm2
-rw-r--r--tests/guix-build.sh7
2 files changed, 8 insertions, 1 deletions
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index 28864435df..fc0c0e2ad3 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -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
diff --git a/tests/guix-build.sh b/tests/guix-build.sh
index 66bf6be8d0..d479296ef1 100644
--- a/tests/guix-build.sh
+++ b/tests/guix-build.sh
@@ -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