mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-12 06:06:53 -05:00
packages: Fix repacked file name extension when zstd is unavailable.
This is a follow-up commit to a869f4bef3 ("packages: Repack patched source archives via zstd by default."). * guix/packages.scm (patch-and-repack): Do not have xz fallback into the zstd variable, which is confusing and caused the extension selection to be wrong when the xz fallback was used. Refine how PATH is set to avoid duplicates. Change-Id: I580deba4de822eccf5f6fe53355b8ba57178c166
This commit is contained in:
parent
47c595b147
commit
3de22656ad
1 changed files with 8 additions and 8 deletions
|
@ -997,10 +997,7 @@ (define instantiate-patch
|
|||
(bzip2 (lookup-input "bzip2"))
|
||||
(lzip (lookup-input "lzip"))
|
||||
(xz (lookup-input "xz"))
|
||||
(zstd (or (lookup-input "zstd")
|
||||
;; Fallback to xz in case zstd is not available, such as
|
||||
;; for bootstrap packages.
|
||||
xz))
|
||||
(zstd (lookup-input "zstd"))
|
||||
(patch (lookup-input "patch"))
|
||||
(comp (and=> (compressor source-file-name) lookup-input))
|
||||
(patches (map instantiate-patch patches)))
|
||||
|
@ -1081,10 +1078,13 @@ (define (repack directory output)
|
|||
locale (system-error-errno args)))))
|
||||
|
||||
(setenv "PATH"
|
||||
(string-append #+zstd "/bin"
|
||||
(if #+comp
|
||||
(string-append ":" #+comp "/bin")
|
||||
"")))
|
||||
(string-join
|
||||
(map (cut string-append <> "/bin")
|
||||
;; Fallback to xz in case zstd is not
|
||||
;; available, such as for bootstrap packages.
|
||||
(delete-duplicates
|
||||
(filter-map identity (list #+zstd #+xz #+comp))))
|
||||
":"))
|
||||
|
||||
(setenv "ZSTD_NBTHREADS" (number->string (parallel-job-count)))
|
||||
|
||||
|
|
Loading…
Reference in a new issue