build: initrd: Fix "write-cpio-archive" return value.

* gnu/build/linux-initrd.scm (write-cpio-archive): Really return OUTPUT on
success, even when compression is disabled.
This commit is contained in:
Maxim Cournoyer 2019-07-16 18:09:38 +09:00
parent 4780db2c93
commit 91e633f043
No known key found for this signature in database
GPG Key ID: 1260E46482E63562
1 changed files with 1 additions and 3 deletions

View File

@ -71,8 +71,7 @@ COMPRESS? is true, compress it using GZIP. On success, return OUTPUT."
(cpio:write-cpio-archive files port (cpio:write-cpio-archive files port
#:file->header cpio:file->cpio-header*))) #:file->header cpio:file->cpio-header*)))
(or (not compress?) (if compress?
;; Gzip insists on adding a '.gz' suffix and does nothing if the input ;; Gzip insists on adding a '.gz' suffix and does nothing if the input
;; file already has that suffix. Shuffle files around to placate it. ;; file already has that suffix. Shuffle files around to placate it.
(let* ((gz-suffix? (string-suffix? ".gz" output)) (let* ((gz-suffix? (string-suffix? ".gz" output))
@ -88,7 +87,6 @@ COMPRESS? is true, compress it using GZIP. On success, return OUTPUT."
(unless gz-suffix? (unless gz-suffix?
(rename-file (string-append output ".gz") output)) (rename-file (string-append output ".gz") output))
output))) output)))
output)) output))
(define (cache-compiled-file-name file) (define (cache-compiled-file-name file)