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.
This commit is contained in:
Ludovic Courtès 2023-10-07 23:21:41 +02:00
parent 002c5bec07
commit aa65f31ed2
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -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 @@ (define profile
(#f "anonymous-tarball.dis"))
build))
(define (disarchive-collection origins)
"Return a directory containing all the Disarchive metadata for ORIGINS."
(directory-union "disarchive-collection"
;; The manifest containing Disarchive data.
(let* ((origins (all-origins))
(disarchives
(filter-map (lambda (origin)
(and (tarball-origin? origin)
;; Dismiss origins with (sha256 #f) such
;; as that of IceCat.
;; 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.
;; 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)))
(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)))