aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-01-26 11:27:11 +0100
committerLudovic Courtès <ludo@gnu.org>2017-01-26 11:29:38 +0100
commit0363474a0b57067000ddd4b131cb31d7c70223fb (patch)
tree5590bb83c56488081f1145a4149b425bfff53bf3
parent9b9e147117e6009451d7acc1f8f156e041263e32 (diff)
downloadguix-0363474a0b57067000ddd4b131cb31d7c70223fb.tar.gz
guix-0363474a0b57067000ddd4b131cb31d7c70223fb.zip
build-system/gnu: 'strip' phase now skips symlinks.
This avoids a situation where the "debug" output would contain separate (and different) .debug files for "libfoo.so" and "libfoo.so.0.0", even though "libfoo.so" is actually a symlink to "libfoo.so.0.0". * guix/build/gnu-build-system.scm (strip): Remove 'file-exists?' call in 'for-each' lambda. Pass a predicate to 'find-files' to restrict the result to regular files.
-rw-r--r--guix/build/gnu-build-system.scm12
1 files changed, 8 insertions, 4 deletions
diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index 59394c2cac..a19d2a3e96 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -389,8 +389,7 @@ makefiles."
debug-output objcopy-command))
(for-each (lambda (file)
- (and (file-exists? file) ;discard dangling symlinks
- (or (elf-file? file) (ar-file? file))
+ (and (or (elf-file? file) (ar-file? file))
(or (not debug-output)
(make-debug-file file))
;; Ensure libraries are writable.
@@ -399,7 +398,12 @@ makefiles."
(append strip-flags (list file))))
(or (not debug-output)
(add-debug-link file))))
- (find-files dir)))
+ (find-files dir
+ (lambda (file stat)
+ ;; Ignore symlinks such as:
+ ;; libfoo.so -> libfoo.so.0.0.
+ (eq? 'regular (stat:type stat)))
+ #:stat lstat)))
(or (not strip-binaries?)
(every strip-dir