From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id sDcOD74ykWYOQAAA62LTzQ:P1 (envelope-from ) for ; Fri, 12 Jul 2024 13:42:22 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id sDcOD74ykWYOQAAA62LTzQ (envelope-from ) for ; Fri, 12 Jul 2024 15:42: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=1720791742; 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=QK/SpCzMW3LQMKdsHoLNQbmMdBmJau8H1YngmaG/E/nTFgD6h6X96Kwvw5MT0bHXaE1yUp bkwjheA3fuBy7rZ9nzTcTMDbS4yNWCaqLF6WOjRUgeyicF7n+YwN8H19GiqlXYJ4wp87kO /BMh3ypBWnhEZGWKwZDk7TX0v9hQoK+svhIvMjEflYA1P6BLdHHmKVqL3bN8ybWZw9WQAT izbTGTZLGx5t64Lc82iVoN129HwcGpwnFp0o9hj3o9LRvSmhs0DtYTO1eCl5W0EbIZbSp3 iMT5+4bGS0gJKswrBKFiP76AQRd2OVvHABmBuxsPJDR85ZoURWOdRh8zSWqeUQ== 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=1720791742; a=rsa-sha256; cv=none; b=MRWHSLQh/3SQvWgtyud9jBal84pdi/eorKYvYk/EGXQc0pDqoTIwF0o6aotfO6XS6FGfe8 SsD37WxBoy0Bd53nJ7gXmiKNrEiXCheJg2VF3myrSQyjWHLx4OX+6VaC5gR2RiOqNl5koU t988ii6/RvNIe5mwWwh5ScexBd/x+6bhBomjTvb8fR0D45b/o1tn0GaW5jc8CIWRjDRvs5 F8h8SI6X/cK7MSyfrR7KoQd+AMxyyXiseVmYEeoc44EgUC/TNkKfgRlvzv0o69XGR/yxxt zhy+mZUKDWkhGDHkBnBZaMZoHGlw5xGrM32AwOV7RMEYt4DbqJtlvToi/xNBww== 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 CAF2368CAF for ; Fri, 12 Jul 2024 15:42:21 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sSGXG-00031y-5Y; Fri, 12 Jul 2024 09:42: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 1sSGXF-0002zE-Dx for guix-patches@gnu.org; Fri, 12 Jul 2024 09:42: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 1sSGXE-0001OG-Hv; Fri, 12 Jul 2024 09:42:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sSGXD-0001EF-NG; Fri, 12 Jul 2024 09:42:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70985] [PATCH v3 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, 12 Jul 2024 13:42:03 +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.17207917144677 (code B ref 70985); Fri, 12 Jul 2024 13:42:03 +0000 Received: (at 70985) by debbugs.gnu.org; 12 Jul 2024 13:41:54 +0000 Received: from localhost ([127.0.0.1]:53516 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sSGX4-0001DI-0P for submit@debbugs.gnu.org; Fri, 12 Jul 2024 09:41:54 -0400 Received: from mira.cbaines.net ([212.71.252.8]:43942) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sSGWy-0001CN-PR for 70985@debbugs.gnu.org; Fri, 12 Jul 2024 09:41:51 -0400 Received: from localhost (unknown [213.31.211.195]) by mira.cbaines.net (Postfix) with ESMTPSA id 13D0227BBEA for <70985@debbugs.gnu.org>; Fri, 12 Jul 2024 14:41:47 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 3822cd74 for <70985@debbugs.gnu.org>; Fri, 12 Jul 2024 13:41:46 +0000 (UTC) From: Christopher Baines Date: Fri, 12 Jul 2024 14:41:42 +0100 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: <7783ce71e892ea74f025323e0a4d323ee8e720fc.1720791705.git.mail@cbaines.net> References: <7783ce71e892ea74f025323e0a4d323ee8e720fc.1720791705.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-Spam-Score: -3.40 X-Migadu-Queue-Id: CAF2368CAF X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -3.40 X-TUID: fVNc3LRAnMvw * 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