aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-03-15 09:31:08 +0000
committerChristopher Baines <mail@cbaines.net>2019-03-15 09:31:08 +0000
commitc4c1f15050623a586cc49c55d8d2f1e61dc6c4ee (patch)
treeaba9d41dba551ea93c3418cad85c97f65a79f99b
parentd2697d8dd2b7394049b129225f7ba6ddf791bf32 (diff)
downloaddata-service-c4c1f15050623a586cc49c55d8d2f1e61dc6c4ee.tar
data-service-c4c1f15050623a586cc49c55d8d2f1e61dc6c4ee.tar.gz
Better guard against errors in packages when loading revisions
In particular, things like undefined variables in the package definition.
-rw-r--r--guix-data-service/jobs/load-new-guix-revision.scm61
1 files changed, 35 insertions, 26 deletions
diff --git a/guix-data-service/jobs/load-new-guix-revision.scm b/guix-data-service/jobs/load-new-guix-revision.scm
index e7fe308..aedbb90 100644
--- a/guix-data-service/jobs/load-new-guix-revision.scm
+++ b/guix-data-service/jobs/load-new-guix-revision.scm
@@ -30,32 +30,41 @@
`(lambda (store)
(append-map
(lambda (inferior-package-id)
- (let* ((package
- (hashv-ref %package-table inferior-package-id))
- (supported-systems
- (package-transitive-supported-systems package)))
- (append-map
- (lambda (system)
- (filter-map
- (lambda (target)
- (catch
- 'misc-error
- (lambda ()
- (guard (c ((package-cross-build-system-error? c)
- #f))
- (list inferior-package-id
- system
- target
- (derivation-file-name
- (if (string=? system target)
- (package-derivation store package system)
- (package-cross-derivation store package
- target
- system))))))
- (lambda args
- #f)))
- supported-systems))
- supported-systems)))
+ (let ((package (hashv-ref %package-table inferior-package-id)))
+ (catch
+ #t
+ (lambda ()
+ (let ((supported-systems
+ (package-transitive-supported-systems package)))
+ (append-map
+ (lambda (system)
+ (filter-map
+ (lambda (target)
+ (catch
+ 'misc-error
+ (lambda ()
+ (guard (c ((package-cross-build-system-error? c)
+ #f))
+ (list inferior-package-id
+ system
+ target
+ (derivation-file-name
+ (if (string=? system target)
+ (package-derivation store package system)
+ (package-cross-derivation store package
+ target
+ system))))))
+ (lambda args
+ ;; misc-error #f ~A ~S (No cross-compilation for clojure-build-system yet:
+ #f)))
+ supported-systems))
+ supported-systems)))
+ (lambda args
+ (simple-format (current-error-port)
+ "error: while processing ~A ignoring error: ~A\n"
+ (package-name package)
+ args)
+ '()))))
(list ,@(map inferior-package-id packages)))))
(inferior-eval-with-store inf store proc))