summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2023-10-07 23:21:41 +0200
committerLudovic Courtès <ludo@gnu.org>2023-10-08 23:43:49 +0200
commitaa65f31ed2a36a57f047651ff429eb9a7dfb0dcc (patch)
treec435381a7ed7ead136883d7b458f22b0c6e43464 /etc
parent002c5bec07e88c00d9d96209438728d0271f57da (diff)
disarchive-manifest: Add one manifest entry per tarball.
This works around a situation where ‘cuirass remote-worker’ now builds with max-jobs = 1 (Cuirass commit 980ef610989895be5ac2ba7f9d1901e5c7f22934). The effect is that all .dis.drv would be performed sequentially, on a single machine (‘cuirass remote-server’ is unable to distribute those derivations to several machines because it only “sees” the ‘disarchive-collection’ derivation). This would take a lot of time and force a rebuild of all of *.dis.drv every time because their build results would not be retrieved by the ‘remote-server’ process. * etc/disarchive-manifest.scm (disarchive-collection): Remove. <top level>: Define ‘disarchives’. Append it to the entries of the manifest.
Diffstat (limited to 'etc')
-rw-r--r--etc/disarchive-manifest.scm61
1 files changed, 34 insertions, 27 deletions
diff --git a/etc/disarchive-manifest.scm b/etc/disarchive-manifest.scm
index 93b5039eec..41f64eae4f 100644
--- a/etc/disarchive-manifest.scm
+++ b/etc/disarchive-manifest.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2021-2022 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2021-2023 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -94,34 +94,41 @@ an empty directory if ORIGIN could not be disassembled."
(#f "anonymous-tarball.dis"))
build))
-(define (disarchive-collection origins)
- "Return a directory containing all the Disarchive metadata for ORIGINS."
- (directory-union "disarchive-collection"
- (filter-map (lambda (origin)
- (and (tarball-origin? origin)
-
- ;; Dismiss origins with (sha256 #f) such
- ;; as that of IceCat.
- (and=> (origin-hash origin)
- content-hash-value)
-
- ;; FIXME: Exclude the Chromium tarball
- ;; because it's huge and "disarchive
- ;; disassemble" exceeds the max-silent
- ;; timeout.
- (not (string-prefix?
- "chromium-"
- (origin-actual-file-name origin)))
-
- (origin->disarchive origin)))
- origins)
- #:copy? #t))
-
;; The manifest containing Disarchive data.
-(let ((origins (all-origins)))
+(let* ((origins (all-origins))
+ (disarchives
+ (filter-map (lambda (origin)
+ (and (tarball-origin? origin)
+
+ ;; Dismiss origins with (sha256 #f) such as that of
+ ;; IceCat.
+ (and=> (origin-hash origin)
+ content-hash-value)
+
+ ;; FIXME: Exclude the Chromium tarball because it's
+ ;; huge and "disarchive disassemble" exceeds the
+ ;; max-silent timeout.
+ (not (string-prefix?
+ "chromium-"
+ (origin-actual-file-name origin)))
+
+ (manifest-entry
+ (name
+ (string-append (origin-actual-file-name origin)
+ ".dis"))
+ (version "0")
+ (item (origin->disarchive origin)))))
+ origins)))
(manifest
- (list (manifest-entry
+ (cons (manifest-entry
(name "disarchive-collection")
(version (number->string (length origins)))
- (item (disarchive-collection origins))))))
+ (item (directory-union "disarchive-collection"
+ (map manifest-entry-item disarchives)
+ #:copy? #t)))
+
+ ;; Cuirass can distribute derivation builds to build machines if and
+ ;; only if it has one "job" per derivation. Thus, add them here in
+ ;; addition to "disarchive-collection".
+ disarchives)))