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
|
@ -49,9 +49,9 @@ COMPRESS? is true, compress it using GZIP. On success, return OUTPUT."
|
||||||
;; directories."
|
;; directories."
|
||||||
|
|
||||||
(define files
|
(define files
|
||||||
;; XXX: Use a deterministic order.
|
;; Use 'sort' so that (1) the order of files is deterministic, and (2)
|
||||||
(reverse
|
;; directories appear before the files they contain.
|
||||||
(file-system-fold (const #t) ;enter?
|
(sort (file-system-fold (const #t) ;enter?
|
||||||
(lambda (file stat result) ;leaf
|
(lambda (file stat result) ;leaf
|
||||||
(cons file result))
|
(cons file result))
|
||||||
(lambda (dir stat result) ;down
|
(lambda (dir stat result) ;down
|
||||||
|
@ -63,7 +63,8 @@ COMPRESS? is true, compress it using GZIP. On success, return OUTPUT."
|
||||||
(const #f) ;skip
|
(const #f) ;skip
|
||||||
(const #f) ;error
|
(const #f) ;error
|
||||||
'()
|
'()
|
||||||
directory)))
|
directory)
|
||||||
|
string<?))
|
||||||
|
|
||||||
(call-with-output-file output
|
(call-with-output-file output
|
||||||
(lambda (port)
|
(lambda (port)
|
||||||
|
|
Loading…
Reference in New Issue