From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id aNg/GzoaiGamRQAAqHPOHw:P1 (envelope-from ) for ; Fri, 05 Jul 2024 16:07:22 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id aNg/GzoaiGamRQAAqHPOHw (envelope-from ) for ; Fri, 05 Jul 2024 18:07:22 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1720195642; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=Ns46XbaNNevjn531K+vWT24OSom/dEyBObE/iAS2wMs=; b=S/2AH4JlOvRyklDjDElN+XU9XA3Kvh1LZCVRC6rPZRWAZhLIwhhLVrNJ14Uh75NnVh21ky EbJf6Qi3qH08jmVaQbKijR7+D/NVGKnMS9fIsfDbBvX51ysbtniFvMdCqp5tt7Tp/NUcxk OuK2F8B/607Z0xsK4v63f9aRxX3ApHD9Jzx8q6bs7ImkMXWRuGvioZrBmgnJ0DlyxwwSMQ S6noURg6xJutyCaebo563o6yLehRfHHjIhb44rPHucTUrMHd3/bQMlSCXmFNkPjOCGAIe+ RojE3xtbg9H4rYe2lhd5+0Fds8E2f8lrhmHp2aCs+kxJU1hAVThjSs7m3dOzPg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1720195642; a=rsa-sha256; cv=none; b=uxfxWKQwqjqaO28b+RiNNSbAcYptqaOJcCPxP2E+ex4UPVTY44gTNYSlOvm4Exbt6mVGyY MQHm1n17CZOeRXkPBVzYMd3s9fki2Osd0T0vVMimum1qDfOivBpi1s908X1O4pyRHV6hV1 Yok+bcPR2Q9FnzzpEobjs6cZP8fdesnwSzLiommW/Xr4u9PlqUDLq6UAmcpda65OzF1Ezd OxHV1LqBFENL3pf0cZmoBLv7AIbc7ZglcENjK8OgRrnXz7hs9zbfjcLVSe8Bo75rIiQY9h Bsa3GXsd5RPPIm+eZoPGe+F255IXLbjAUshW+0nrYqN+D1+lsbM/aiiAZFBemg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E1C9162B4C for ; Fri, 5 Jul 2024 18:07:20 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sPlSk-0005g3-Qn; Fri, 05 Jul 2024 12:07:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sPlSj-0005fv-LO for guix-patches@gnu.org; Fri, 05 Jul 2024 12:07:05 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPlSj-00045t-Ci; Fri, 05 Jul 2024 12:07:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sPlSi-0003Ou-BD; Fri, 05 Jul 2024 12:07:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70985] [PATCH v2 3/6] guix: packages: Add &unsupported-cross-compilation-target-error. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Fri, 05 Jul 2024 16:07:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70985 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70985@debbugs.gnu.org Cc: Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 70985-submit@debbugs.gnu.org id=B70985.172019560313005 (code B ref 70985); Fri, 05 Jul 2024 16:07:04 +0000 Received: (at 70985) by debbugs.gnu.org; 5 Jul 2024 16:06:43 +0000 Received: from localhost ([127.0.0.1]:44855 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sPlSN-0003Nb-8p for submit@debbugs.gnu.org; Fri, 05 Jul 2024 12:06:43 -0400 Received: from mira.cbaines.net ([212.71.252.8]:43918) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sPlSL-0003N4-H8 for 70985@debbugs.gnu.org; Fri, 05 Jul 2024 12:06:42 -0400 Received: from localhost (nat-inria-guest-32-gw-01-bso.bordeaux.inria.fr [194.199.1.32]) by mira.cbaines.net (Postfix) with ESMTPSA id 788B727BBEA for <70985@debbugs.gnu.org>; Fri, 5 Jul 2024 17:06:06 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 5d5a43f9 for <70985@debbugs.gnu.org>; Fri, 5 Jul 2024 16:06:04 +0000 (UTC) From: Christopher Baines Date: Fri, 5 Jul 2024 18:06:00 +0200 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: <9f11c96f25ba0f8f0c63ad3d6f5d6295035e7cc7.1720195563.git.mail@cbaines.net> References: <9f11c96f25ba0f8f0c63ad3d6f5d6295035e7cc7.1720195563.git.mail@cbaines.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: E1C9162B4C X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -3.39 X-Spam-Score: -3.39 X-TUID: 68Yo/2Ap680z * 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