aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanneke Nieuwenhuizen <janneke@gnu.org>2023-09-18 08:09:50 +0200
committerJanneke Nieuwenhuizen <janneke@gnu.org>2023-09-19 11:01:14 +0200
commit15c5f1a2c20b21de0f19f42db1ccab4c42117ebb (patch)
tree2a7e1437d5698064bca3c5e72c6cd7444e0abbb1
parent7841a624f0c94efbfeb48a5209dbd92575eacc09 (diff)
downloadguix-15c5f1a2c20b21de0f19f42db1ccab4c42117ebb.tar.gz
guix-15c5f1a2c20b21de0f19f42db1ccab4c42117ebb.zip
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".
-rw-r--r--guix/self.scm18
1 files changed, 9 insertions, 9 deletions
diff --git a/guix/self.scm b/guix/self.scm
index d2300052d8..b8b9b9fe37 100644
--- a/guix/self.scm
+++ b/guix/self.scm
@@ -1245,14 +1245,13 @@ containing MODULE-FILES and possibly other files as well."
(* 100. (/ completed total)) total)
(force-output))
- (define (process-directory directory files output)
- (let* ((size 25) ;compile max 25 files a time
- (chunks (unfold
- (lambda (seed) (< (length seed) size)) ;p
- (cute take <> size) ;f
- (cute drop <> size) ;g
- files ;seed
- list))) ;tail
+ (define* (process-directory directory files output #:key (size 25))
+ (let ((chunks (unfold
+ (lambda (seed) (< (length seed) size)) ;p
+ (cute take <> size) ;f
+ (cute drop <> size) ;g
+ files ;seed
+ list))) ;tail
(for-each
(lambda (chunk)
;; Hide compilation warnings.
@@ -1290,7 +1289,8 @@ containing MODULE-FILES and possibly other files as well."
(mkdir #$output)
(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))))
(computed-file name build