Retry computing channel instance manifests
On readlink errors.
This commit is contained in:
parent
961441cab0
commit
d8ae6062b1
1 changed files with 27 additions and 17 deletions
|
|
@ -1570,12 +1570,13 @@ SELECT store_path FROM derivation_source_files WHERE id = $1"
|
||||||
(commit ,(channel-commit channel)))
|
(commit ,(channel-commit channel)))
|
||||||
,(channel-instance-commit channel-instance)
|
,(channel-instance-commit channel-instance)
|
||||||
,(channel-instance-checkout channel-instance)))))
|
,(channel-instance-checkout channel-instance)))))
|
||||||
|
|
||||||
|
(define (compute)
|
||||||
(simple-format
|
(simple-format
|
||||||
(current-error-port)
|
(current-error-port)
|
||||||
"guix-data-service: computing the derivation-file-name for ~A\n"
|
"guix-data-service: computing the derivation-file-name for ~A\n"
|
||||||
system)
|
system)
|
||||||
|
|
||||||
(let ((manifest
|
|
||||||
(catch #t
|
(catch #t
|
||||||
(lambda ()
|
(lambda ()
|
||||||
((channel-instances->manifest instances #:system system) store))
|
((channel-instances->manifest instances #:system system) store))
|
||||||
|
|
@ -1587,7 +1588,16 @@ SELECT store_path FROM derivation_source_files WHERE id = $1"
|
||||||
(simple-format
|
(simple-format
|
||||||
(current-error-port)
|
(current-error-port)
|
||||||
"error ~A: ~A\n" key args)
|
"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)
|
(define (add-tmp-root-and-return-drv drv)
|
||||||
(add-temp-root store drv)
|
(add-temp-root store drv)
|
||||||
drv)
|
drv)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue