self: Compile guix-packages-base in chunks of 10 files.
This fixes or greatly increases the chances for `guix pull' to succeed on the Hurd, see <https://issues.guix.gnu.org/65456>. * guix/self.scm (compiled-modules)[process-directory]: Move hardcoded size to keyword parameter #:size. Set it to 10 when compiling "guix-packages-base".
This commit is contained in:
parent
7841a624f0
commit
15c5f1a2c2
@ -1245,14 +1245,13 @@ containing MODULE-FILES and possibly other files as well."
|
|||||||
(* 100. (/ completed total)) total)
|
(* 100. (/ completed total)) total)
|
||||||
(force-output))
|
(force-output))
|
||||||
|
|
||||||
(define (process-directory directory files output)
|
(define* (process-directory directory files output #:key (size 25))
|
||||||
(let* ((size 25) ;compile max 25 files a time
|
(let ((chunks (unfold
|
||||||
(chunks (unfold
|
(lambda (seed) (< (length seed) size)) ;p
|
||||||
(lambda (seed) (< (length seed) size)) ;p
|
(cute take <> size) ;f
|
||||||
(cute take <> size) ;f
|
(cute drop <> size) ;g
|
||||||
(cute drop <> size) ;g
|
files ;seed
|
||||||
files ;seed
|
list))) ;tail
|
||||||
list))) ;tail
|
|
||||||
(for-each
|
(for-each
|
||||||
(lambda (chunk)
|
(lambda (chunk)
|
||||||
;; Hide compilation warnings.
|
;; Hide compilation warnings.
|
||||||
@ -1290,7 +1289,8 @@ containing MODULE-FILES and possibly other files as well."
|
|||||||
|
|
||||||
(mkdir #$output)
|
(mkdir #$output)
|
||||||
(chdir #+module-tree)
|
(chdir #+module-tree)
|
||||||
(process-directory "." '#+module-files #$output)
|
(let ((size (if (equal? #$name "guix-packages-base") 10 25)))
|
||||||
|
(process-directory "." '#+module-files #$output #:size size))
|
||||||
(newline))))
|
(newline))))
|
||||||
|
|
||||||
(computed-file name build
|
(computed-file name build
|
||||||
|
Loading…
x
Reference in New Issue
Block a user