Better guard against errors in packages when loading revisions
In particular, things like undefined variables in the package definition.
This commit is contained in:
parent
d2697d8dd2
commit
c4c1f15050
1 changed files with 35 additions and 26 deletions
|
|
@ -30,32 +30,41 @@
|
||||||
`(lambda (store)
|
`(lambda (store)
|
||||||
(append-map
|
(append-map
|
||||||
(lambda (inferior-package-id)
|
(lambda (inferior-package-id)
|
||||||
(let* ((package
|
(let ((package (hashv-ref %package-table inferior-package-id)))
|
||||||
(hashv-ref %package-table inferior-package-id))
|
(catch
|
||||||
(supported-systems
|
#t
|
||||||
(package-transitive-supported-systems package)))
|
(lambda ()
|
||||||
(append-map
|
(let ((supported-systems
|
||||||
(lambda (system)
|
(package-transitive-supported-systems package)))
|
||||||
(filter-map
|
(append-map
|
||||||
(lambda (target)
|
(lambda (system)
|
||||||
(catch
|
(filter-map
|
||||||
'misc-error
|
(lambda (target)
|
||||||
(lambda ()
|
(catch
|
||||||
(guard (c ((package-cross-build-system-error? c)
|
'misc-error
|
||||||
#f))
|
(lambda ()
|
||||||
(list inferior-package-id
|
(guard (c ((package-cross-build-system-error? c)
|
||||||
system
|
#f))
|
||||||
target
|
(list inferior-package-id
|
||||||
(derivation-file-name
|
system
|
||||||
(if (string=? system target)
|
target
|
||||||
(package-derivation store package system)
|
(derivation-file-name
|
||||||
(package-cross-derivation store package
|
(if (string=? system target)
|
||||||
target
|
(package-derivation store package system)
|
||||||
system))))))
|
(package-cross-derivation store package
|
||||||
(lambda args
|
target
|
||||||
#f)))
|
system))))))
|
||||||
supported-systems))
|
(lambda args
|
||||||
supported-systems)))
|
;; 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)))))
|
(list ,@(map inferior-package-id packages)))))
|
||||||
|
|
||||||
(inferior-eval-with-store inf store proc))
|
(inferior-eval-with-store inf store proc))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue