Retry computing channel instance manifests

On readlink errors.
This commit is contained in:
Christopher Baines 2025-05-24 11:46:27 +01:00
parent 961441cab0
commit d8ae6062b1

View file

@ -1570,12 +1570,13 @@ SELECT store_path FROM derivation_source_files WHERE id = $1"
(commit ,(channel-commit channel)))
,(channel-instance-commit channel-instance)
,(channel-instance-checkout channel-instance)))))
(define (compute)
(simple-format
(current-error-port)
"guix-data-service: computing the derivation-file-name for ~A\n"
system)
(let ((manifest
(catch #t
(lambda ()
((channel-instances->manifest instances #:system system) store))
@ -1587,7 +1588,16 @@ SELECT store_path FROM derivation_source_files WHERE id = $1"
(simple-format
(current-error-port)
"error ~A: ~A\n" key args)
#f))))
(match (cons key args)
(('system-error "readlink" _ ...)
'retry)
(_ #f)))))
(let loop ((manifest (compute)))
(when (eq? mainfest 'retry)
(loop (compute)))
(define (add-tmp-root-and-return-drv drv)
(add-temp-root store drv)
drv)