summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo Prikler <leo.prikler@student.tugraz.at>2020-02-27 14:49:11 +0100
committerPierre Neidhardt <mail@ambrevar.xyz>2020-02-28 09:39:31 +0100
commita3b1f878dfeddfc8516fba8483e3191a3e4c887e (patch)
treed89d86f26bddf16581d5e2b3c2f80da4df135a07
parent2e76ddd67ff2e10a151b5de3c67a480d94c01671 (diff)
downloadpatches-a3b1f878dfeddfc8516fba8483e3191a3e4c887e.tar
patches-a3b1f878dfeddfc8516fba8483e3191a3e4c887e.tar.gz
build-system: copy-build-system: Keep symlinks symbolic.
guix/build/copy-build-system.scm (install)[install-file]: Read symlinks as is done in install-simple through copy-recursively. Signed-off-by: Pierre Neidhardt <mail@ambrevar.xyz>
-rw-r--r--guix/build/copy-build-system.scm8
1 files changed, 7 insertions, 1 deletions
diff --git a/guix/build/copy-build-system.scm b/guix/build/copy-build-system.scm
index 6d9dc8f93b..a86f0cde29 100644
--- a/guix/build/copy-build-system.scm
+++ b/guix/build/copy-build-system.scm
@@ -91,7 +91,13 @@ if TARGET ends with a '/', the source is installed underneath."
file))))
(format (current-output-port) "`~a' -> `~a'~%" file dest)
(mkdir-p (dirname dest))
- (copy-file file dest)))
+ (let ((stat (lstat file)))
+ (case (stat:type stat)
+ ((symlink)
+ (let ((target (readlink file)))
+ (symlink target dest)))
+ (else
+ (copy-file file dest))))))
(define* (make-file-predicate suffixes matches-regexp #:optional (default-value #t))
"Return a predicate that returns #t if its file argument matches the