[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/11: guix: packages: Add new &package-unsupported-target-error.
From: |
guix-commits |
Subject: |
01/11: guix: packages: Add new &package-unsupported-target-error. |
Date: |
Mon, 15 Jul 2024 17:35:19 -0400 (EDT) |
cbaines pushed a commit to branch master
in repository guix.
commit 4b85db10b1b45c6ef7b41b9c338eddf87e12b373
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Thu May 16 16:06:03 2024 +0100
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
---
guix/packages.scm | 7 +++++++
guix/ui.scm | 7 +++++++
2 files changed, 14 insertions(+)
diff --git a/guix/packages.scm b/guix/packages.scm
index f3a9a61785..e793714f2e 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -173,6 +173,9 @@
package-error-invalid-input
&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
bag->derivation
@@ -850,6 +853,10 @@ exist, return #f instead."
(define-condition-type &package-cross-build-system-error &package-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 "@"))
"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
diff --git a/guix/ui.scm b/guix/ui.scm
index d82fa533cc..0bb1b3b3ba 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -756,6 +756,13 @@ evaluating the tests and bodies of CLAUSES."
(location->string loc)
(package-full-name package)
(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)
(let ((input (gexp-error-invalid-input c)))
(leave (G_ "~s: invalid G-expression input~%")
- branch master updated (0e5e3edec5 -> bf6ab0e0f5), guix-commits, 2024/07/15
- 01/11: guix: packages: Add new &package-unsupported-target-error.,
guix-commits <=
- 09/11: gnu: make-mingw-w64: Update to 12.0.0., guix-commits, 2024/07/15
- 11/11: gnu: mingw-w64-tools: Update to 12.0.0., guix-commits, 2024/07/15
- 03/11: guix: packages: Add &unsupported-cross-compilation-target-error., guix-commits, 2024/07/15
- 02/11: gnu: tls: Raise conditions from target->openssl-target., guix-commits, 2024/07/15
- 04/11: build-system: meson: Use a more specific exception., guix-commits, 2024/07/15
- 05/11: gnu: rust: Guard against unsupported rust targets., guix-commits, 2024/07/15
- 08/11: gnu: make-mingw-w64: Use G-Expressions., guix-commits, 2024/07/15
- 06/11: build-system: go: Properly handle when a target is unsupported., guix-commits, 2024/07/15
- 10/11: gnu: mingw-w64-tools: Use G-Expressions., guix-commits, 2024/07/15
- 07/11: gnu: make-mingw-w64: Memoize., guix-commits, 2024/07/15