mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-16 19:57:39 -05:00
build-system/gnu: Gracefully handle dangling symlinks in the 'strip' phase.
* guix/build/gnu-build-system.scm (strip): Check whether 'file-exists?' before calling 'elf-file?' and 'ar-file?'. This should fix build failures in the presence of dangling symlinks, as in <http://hydra.gnu.org/build/167521/nixlog/1/raw>.
This commit is contained in:
parent
c23d17095d
commit
f8bcf1935a
1 changed files with 2 additions and 1 deletions
|
@ -343,7 +343,8 @@ (define (strip-dir dir)
|
|||
debug-output objcopy-command))
|
||||
(file-system-fold (const #t)
|
||||
(lambda (path stat result) ; leaf
|
||||
(and (or (elf-file? path) (ar-file? path))
|
||||
(and (file-exists? path) ;discard dangling symlinks
|
||||
(or (elf-file? path) (ar-file? path))
|
||||
(or (not debug-output)
|
||||
(make-debug-file path))
|
||||
(zero? (apply system* strip-command
|
||||
|
|
Loading…
Reference in a new issue