packages: Enable threaded compression of source tarballs.
This provides a ~2x speedup when using 4 threads. * guix/packages.scm (patch-and-repack)[build]: Invoke xz with '--threads=0' when re-packing tarballs.
This commit is contained in:
parent
dc4ebebd61
commit
c8a3dea847
|
@ -576,7 +576,12 @@ specifies modules in scope when evaluating SNIPPET."
|
||||||
#:fail-on-error? #t)))))
|
#:fail-on-error? #t)))))
|
||||||
(zero? (apply system*
|
(zero? (apply system*
|
||||||
(string-append #+tar "/bin/tar")
|
(string-append #+tar "/bin/tar")
|
||||||
"cvfa" #$output
|
"cvf" #$output
|
||||||
|
;; The bootstrap xz does not support
|
||||||
|
;; threaded compression (introduced in
|
||||||
|
;; 5.2.0), but it ignores the extra flag.
|
||||||
|
(string-append "--use-compress-program="
|
||||||
|
#+xz "/bin/xz --threads=0")
|
||||||
;; avoid non-determinism in the archive
|
;; avoid non-determinism in the archive
|
||||||
"--mtime=@0"
|
"--mtime=@0"
|
||||||
"--owner=root:0"
|
"--owner=root:0"
|
||||||
|
|
Loading…
Reference in New Issue