mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 05:48:07 -05:00
linux-initrd: Populate cpio archives in a deterministic order.
* gnu/build/linux-initrd.scm (write-cpio-archive)[files]: Use 'sort' instead of 'reverse'.
This commit is contained in:
parent
e8277f90c8
commit
583323ca1d
1 changed files with 16 additions and 15 deletions
|
@ -49,9 +49,9 @@ (define* (write-cpio-archive output directory
|
|||
;; directories."
|
||||
|
||||
(define files
|
||||
;; XXX: Use a deterministic order.
|
||||
(reverse
|
||||
(file-system-fold (const #t) ;enter?
|
||||
;; Use 'sort' so that (1) the order of files is deterministic, and (2)
|
||||
;; directories appear before the files they contain.
|
||||
(sort (file-system-fold (const #t) ;enter?
|
||||
(lambda (file stat result) ;leaf
|
||||
(cons file result))
|
||||
(lambda (dir stat result) ;down
|
||||
|
@ -63,7 +63,8 @@ (define files
|
|||
(const #f) ;skip
|
||||
(const #f) ;error
|
||||
'()
|
||||
directory)))
|
||||
directory)
|
||||
string<?))
|
||||
|
||||
(call-with-output-file output
|
||||
(lambda (port)
|
||||
|
|
Loading…
Reference in a new issue