hydra-eval-guile-jobs: Register derivations as GC roots.

[?]
Apr 8, 2014, 4:21 PM
IS7GUIWYGOHEOYMOULIRE45MG7FFSBDN2MYDPKLGZ6PIQ5X4F5XQC

Dependencies

  • [2] QMW24O5S Add support for Guile & Guix.
  • [3] 3K3GDTUQ hydra-eval-guile-jobs: Honor $NIX_STORE_DIR.
  • [4] SVDJSA6U hydra-eval-guile-jobs: Adjust to multiple-output format.

Change contents

  • replacement in src/script/hydra-eval-guile-jobs.in at line 74
    [2.5298][2.5298:5335]()
    (define (job-evaluations->sxml jobs)
    [2.5298]
    [2.5335]
    (define (register-gc-root drv roots-dir)
    "Register a permanent garbage collector root under ROOTS-DIR for DRV."
    (let ((root (string-append roots-dir "/" (basename drv))))
    (unless (file-exists? root)
    (symlink drv root))))
    (define* (job-evaluations->sxml jobs
    #:key gc-roots-dir)
  • edit in src/script/hydra-eval-guile-jobs.in at line 103
    [2.6153]
    [2.6153]
    (when gc-roots-dir
    ;; Register DRV as a GC root so that it's not collected by
    ;; the time 'hydra-build' attempts to build it.
    (register-gc-root drv gc-roots-dir))
  • replacement in src/script/hydra-eval-guile-jobs.in at line 154
    [2.8036][2.8036:8077]()
    (define (job-evaluations->xml jobs port)
    [2.8036]
    [2.8077]
    (define* (job-evaluations->xml jobs port
    #:key gc-roots-dir)
  • replacement in src/script/hydra-eval-guile-jobs.in at line 157
    [2.8113][2.8113:8162]()
    (sxml->xml (job-evaluations->sxml jobs) port))
    [2.8113]
    [2.8162]
    (sxml->xml (job-evaluations->sxml jobs #:gc-roots-dir gc-roots-dir)
    port))
  • replacement in src/script/hydra-eval-guile-jobs.in at line 243
    [2.11279][2.11279:11338]()
    (job-evaluations->xml jobs (current-output-port)))))
    [2.11279]
    (unless (string? gc-roots-dir)
    (format (current-error-port)
    "warning: --gc-roots-dir not specified~%"))
    (job-evaluations->xml jobs (current-output-port)
    #:gc-roots-dir gc-roots-dir))))