Subject: bug#42371: Grafts max out build slots without being queued

From: zimoun <[email-masked]>
Date: Fri, 04 Dec 2020 15:18:35 +0100

Hi,

As a reminder about the annoyance of the bug, I get:

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix build -m ~/tmp/Guix/list-bioconductor.scm -k -v0 --check
guix build: error: all build users are currently in use; consider creating additional users and adding them to the `guixbuild' group
--8<---------------cut here---------------end--------------->8---

where list-bioconductor.scm is below.  It is annoying because the bug
prevents massive rebuild; for instance here the ones from the
Bioconductor archive, useful when massive update or to track
reproducibility issue.

All the best,
simon

--8<---------------cut here---------------start------------->8---
(use-modules (guix) (gnu)
             (guix download)
             (guix svn-download)
             (guix git-download)
             (ice-9 match)
             (srfi srfi-1)
             (srfi srfi-26))

(define (bioconductor? package)
  (define (bioc-string? str)
    (string-contains str "bioconductor.org"))

  (match (package-source package)
    ((? origin? o)
     (match (origin-uri o)
       ((? string? url)
        (bioc-string? url))
       (((? string? urls) ...)
        (any bioc-string? urls))                ;or 'find'
       (_ #f)))
    (_ #f)))

(define packages-from-bioconductor
  (fold-packages (lambda (package result)
                   (if (bioconductor? package)
                       (cons package result)
                       result))
                 '()))

;; (map (lambda (pkg)
;;        (begin
;;          (format #t "~A~%"(package-name pkg))))
;;      packages-from-bioconductor)

(specifications->manifest
 (map package-name packages-from-bioconductor))
--8<---------------cut here---------------end--------------->8---