mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-02-01 15:26:47 +01:00
guix: packages: Add new &package-unsupported-target-error.
Some packages don't support cross building to specific targets, so add a error type to signal this. * guix/packages.scm (&package-unsupported-target-error): New condition type. [package-unsupported-target-error? package-unsupported-target-error-target): New procedures. * guix/ui.scm (call-with-error-handling): Handle this new condition type. Change-Id: Ib47813399e04b20d616a95f545b6aabe25736e92
This commit is contained in:
parent
0e5e3edec5
commit
4b85db10b1
2 changed files with 14 additions and 0 deletions
|
@ -173,6 +173,9 @@ (define-module (guix packages)
|
||||||
package-error-invalid-input
|
package-error-invalid-input
|
||||||
&package-cross-build-system-error
|
&package-cross-build-system-error
|
||||||
package-cross-build-system-error?
|
package-cross-build-system-error?
|
||||||
|
&package-unsupported-target-error
|
||||||
|
package-unsupported-target-error?
|
||||||
|
package-unsupported-target-error-target
|
||||||
|
|
||||||
package->bag
|
package->bag
|
||||||
bag->derivation
|
bag->derivation
|
||||||
|
@ -850,6 +853,10 @@ (define-condition-type &package-cyclic-dependency-error &package-error
|
||||||
(define-condition-type &package-cross-build-system-error &package-error
|
(define-condition-type &package-cross-build-system-error &package-error
|
||||||
package-cross-build-system-error?)
|
package-cross-build-system-error?)
|
||||||
|
|
||||||
|
(define-condition-type &package-unsupported-target-error &package-error
|
||||||
|
package-unsupported-target-error?
|
||||||
|
(target package-unsupported-target-error-target))
|
||||||
|
|
||||||
(define* (package-full-name package #:optional (delimiter "@"))
|
(define* (package-full-name package #:optional (delimiter "@"))
|
||||||
"Return the full name of PACKAGE--i.e., `NAME@VERSION'. By specifying
|
"Return the full name of PACKAGE--i.e., `NAME@VERSION'. By specifying
|
||||||
DELIMITER (a string), you can customize what will appear between the name and
|
DELIMITER (a string), you can customize what will appear between the name and
|
||||||
|
|
|
@ -756,6 +756,13 @@ (define (port-filename* port)
|
||||||
(location->string loc)
|
(location->string loc)
|
||||||
(package-full-name package)
|
(package-full-name package)
|
||||||
(build-system-name system))))
|
(build-system-name system))))
|
||||||
|
((package-unsupported-target-error? c)
|
||||||
|
(let* ((package (package-error-package c))
|
||||||
|
(loc (package-location package)))
|
||||||
|
(leave (G_ "~a: ~a: does not support target `~a'~%")
|
||||||
|
(location->string loc)
|
||||||
|
(package-full-name package)
|
||||||
|
(package-unsupported-target-error-target c))))
|
||||||
((gexp-input-error? c)
|
((gexp-input-error? c)
|
||||||
(let ((input (gexp-error-invalid-input c)))
|
(let ((input (gexp-error-invalid-input c)))
|
||||||
(leave (G_ "~s: invalid G-expression input~%")
|
(leave (G_ "~s: invalid G-expression input~%")
|
||||||
|
|
Loading…
Reference in a new issue