From: Christopher Baines <mail@cbaines.net>
To: 70985@debbugs.gnu.org
Cc: "Christopher Baines" <guix@cbaines.net>,
"Josselin Poiret" <dev@jpoiret.xyz>,
"Ludovic Courtès" <ludo@gnu.org>,
"Mathieu Othacehe" <othacehe@gnu.org>,
"Simon Tournier" <zimon.toutoune@gmail.com>,
"Tobias Geerinckx-Rice" <me@tobias.gr>
Subject: [bug#70985] [PATCH v2 3/6] guix: packages: Add &unsupported-cross-compilation-target-error.
Date: Fri, 5 Jul 2024 18:06:00 +0200 [thread overview]
Message-ID: <e47f9d8e7020f099f5578027ac81ae81c531d046.1720195563.git.mail@cbaines.net> (raw)
In-Reply-To: <9f11c96f25ba0f8f0c63ad3d6f5d6295035e7cc7.1720195563.git.mail@cbaines.net>
* guix/packages.scm (&unsupported-cross-compilation-target-error): New
variable.
* guix/ui.scm (call-with-error-handling): Handle this new condition type.
Change-Id: I9e7782ee4799b5fecb3c890a75008c35c003f55d
---
guix/packages.scm | 10 ++++++++++
guix/ui.scm | 7 +++++++
2 files changed, 17 insertions(+)
diff --git a/guix/packages.scm b/guix/packages.scm
index e793714f2e..c953db9a03 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -160,6 +160,11 @@ (define-module (guix packages)
%cuirass-supported-systems
supported-package?
+ &unsupported-cross-compilation-target-error
+ unsupported-cross-compilation-target-error?
+ unsupported-cross-compilation-target-error-build-system
+ unsupported-cross-compilation-target-error-target
+
&package-error
package-error?
package-error-package
@@ -834,6 +839,11 @@ (define-syntax-rule (this-package-native-input name)
;; Error conditions.
+(define-condition-type &unsupported-cross-compilation-target-error &error
+ unsupported-cross-compilation-target-error?
+ (build-system unsupported-cross-compilation-target-error-build-system)
+ (target unsupported-cross-compilation-target-error-target))
+
(define-condition-type &package-error &error
package-error?
(package package-error-package))
diff --git a/guix/ui.scm b/guix/ui.scm
index 0bb1b3b3ba..9db6f6e9d7 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -763,6 +763,13 @@ (define (call-with-error-handling thunk)
(location->string loc)
(package-full-name package)
(package-unsupported-target-error-target c))))
+ ((unsupported-cross-compilation-target-error? c)
+ (let ((build-system
+ (unsupported-cross-compilation-target-error-build-system c))
+ (target (unsupported-cross-compilation-target-error-target c)))
+ (leave (G_ "the `~a' build system: does not support target `~a'~%")
+ (build-system-name build-system)
+ target)))
((gexp-input-error? c)
(let ((input (gexp-error-invalid-input c)))
(leave (G_ "~s: invalid G-expression input~%")
--
2.45.2
next prev parent reply other threads:[~2024-07-05 16:07 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-16 14:59 [bug#70985] [PATCH 0/4] Use specific errors for unsupported targets Christopher Baines
2024-05-16 15:06 ` [bug#70985] [PATCH 1/4] guix: packages: Add new &package-unsupported-target-error Christopher Baines
2024-05-16 15:06 ` [bug#70985] [PATCH 2/4] gnu: tls: Raise conditions from target->openssl-target Christopher Baines
2024-05-16 15:06 ` [bug#70985] [PATCH 3/4] gnu: cross-libc*: Raise conditions rather than returning #f Christopher Baines
2024-05-16 15:15 ` Ludovic Courtès
2024-05-16 16:16 ` Christopher Baines
2024-05-16 15:06 ` [bug#70985] [PATCH 4/4] guix: build-system: meson: Don't error on unsupported targets Christopher Baines
2024-05-16 15:13 ` Ludovic Courtès
2024-05-16 16:10 ` Christopher Baines
2024-05-16 15:16 ` [bug#70985] [PATCH 0/4] Use specific errors for " Ludovic Courtès
2024-05-17 9:53 ` [bug#70985] [PATCH 3/4] gnu: cross-libc*: Raise conditions rather than returning #f Jean-Pierre De Jesus Diaz
2024-07-05 16:05 ` [bug#70985] [PATCH v2 1/6] guix: packages: Add new &package-unsupported-target-error Christopher Baines
2024-07-05 16:05 ` [bug#70985] [PATCH v2 2/6] gnu: tls: Raise conditions from target->openssl-target Christopher Baines
2024-07-05 16:06 ` Christopher Baines [this message]
2024-07-05 16:06 ` [bug#70985] [PATCH v2 4/6] build-system: meson: Use a more specific exception Christopher Baines
2024-07-05 16:06 ` [bug#70985] [PATCH v2 5/6] gnu: rust: Guard against cross-libc returning #f Christopher Baines
2024-07-07 16:26 ` Efraim Flashner
2024-07-07 16:57 ` Efraim Flashner
2024-07-09 9:25 ` Christopher Baines
2024-07-09 15:21 ` Efraim Flashner
2024-07-12 13:56 ` Christopher Baines
2024-07-05 16:06 ` [bug#70985] [PATCH v2 6/6] build-system: go: Properly handle when a target is unsupported Christopher Baines
2024-07-12 13:41 ` [bug#70985] [PATCH v3 1/6] guix: packages: Add new &package-unsupported-target-error Christopher Baines
2024-07-12 13:41 ` [bug#70985] [PATCH v3 2/6] gnu: tls: Raise conditions from target->openssl-target Christopher Baines
2024-07-12 13:41 ` [bug#70985] [PATCH v3 3/6] guix: packages: Add &unsupported-cross-compilation-target-error Christopher Baines
2024-07-12 13:41 ` [bug#70985] [PATCH v3 4/6] build-system: meson: Use a more specific exception Christopher Baines
2024-07-12 13:41 ` [bug#70985] [PATCH v3 5/6] gnu: rust: Guard against unsupported rust targets Christopher Baines
2024-07-12 14:28 ` Efraim Flashner
2024-07-18 14:16 ` bug#70985: " Christopher Baines
2024-07-12 13:41 ` [bug#70985] [PATCH v3 6/6] build-system: go: Properly handle when a target is unsupported Christopher Baines
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e47f9d8e7020f099f5578027ac81ae81c531d046.1720195563.git.mail@cbaines.net \
--to=mail@cbaines.net \
--cc=70985@debbugs.gnu.org \
--cc=dev@jpoiret.xyz \
--cc=guix@cbaines.net \
--cc=ludo@gnu.org \
--cc=me@tobias.gr \
--cc=othacehe@gnu.org \
--cc=zimon.toutoune@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).