build-system/gnu: 'strip' phase lists files in sorted order.
This fixes a bug whereby the choice between stripping 'libfoo.so.0.1.2' and stripping 'libfoo.so' (the symlink) would be non-deterministic. * guix/build/gnu-build-system.scm (strip)[strip-dir]: Use 'find-files' instead of 'file-system-fold' so that files are picked in deterministic order.
This commit is contained in:
parent
73dc727ec8
commit
ff43e353a1
|
@ -386,26 +386,17 @@ makefiles."
|
||||||
(when debug-output
|
(when debug-output
|
||||||
(format #t "debugging output written to ~s using ~s~%"
|
(format #t "debugging output written to ~s using ~s~%"
|
||||||
debug-output objcopy-command))
|
debug-output objcopy-command))
|
||||||
(file-system-fold (const #t)
|
|
||||||
(lambda (path stat result) ; leaf
|
(for-each (lambda (file)
|
||||||
(and (file-exists? path) ;discard dangling symlinks
|
(and (file-exists? file) ;discard dangling symlinks
|
||||||
(or (elf-file? path) (ar-file? path))
|
(or (elf-file? file) (ar-file? file))
|
||||||
(or (not debug-output)
|
(or (not debug-output)
|
||||||
(make-debug-file path))
|
(make-debug-file file))
|
||||||
(zero? (apply system* strip-command
|
(zero? (apply system* strip-command
|
||||||
(append strip-flags (list path))))
|
(append strip-flags (list file))))
|
||||||
(or (not debug-output)
|
(or (not debug-output)
|
||||||
(add-debug-link path))))
|
(add-debug-link file))))
|
||||||
(const #t) ; down
|
(find-files dir)))
|
||||||
(const #t) ; up
|
|
||||||
(const #t) ; skip
|
|
||||||
(lambda (path stat errno result)
|
|
||||||
(format (current-error-port)
|
|
||||||
"strip: failed to access `~a': ~a~%"
|
|
||||||
path (strerror errno))
|
|
||||||
#f)
|
|
||||||
#t
|
|
||||||
dir))
|
|
||||||
|
|
||||||
(or (not strip-binaries?)
|
(or (not strip-binaries?)
|
||||||
(every strip-dir
|
(every strip-dir
|
||||||
|
|
Loading…
Reference in New Issue