From patchwork Tue Jul 16 08:45:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Baines X-Patchwork-Id: 29328 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 1D9AB27BBE9; Tue, 16 Jul 2024 09:47:09 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D43CB27BBE2 for ; Tue, 16 Jul 2024 09:47:07 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sTdp7-00067h-2X; Tue, 16 Jul 2024 04:46:14 -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 1sTdou-0005wS-8C for guix-patches@gnu.org; Tue, 16 Jul 2024 04:46:01 -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 1sTdot-0005w6-KG; Tue, 16 Jul 2024 04:45:59 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sTdow-0004AI-01; Tue, 16 Jul 2024 04:46:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72136] [PATCH 1/2] gnu: coreutils-minimal: Don't support targets with no system. References: <87ed7t7mog.fsf@cbaines.net> In-Reply-To: <87ed7t7mog.fsf@cbaines.net> Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: ludo@gnu.org, guix-patches@gnu.org Resent-Date: Tue, 16 Jul 2024 08:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72136 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72136@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= X-Debbugs-Original-Xcc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 72136-submit@debbugs.gnu.org id=B72136.172111951515937 (code B ref 72136); Tue, 16 Jul 2024 08:46:01 +0000 Received: (at 72136) by debbugs.gnu.org; 16 Jul 2024 08:45:15 +0000 Received: from localhost ([127.0.0.1]:60946 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sTdoB-00048z-8k for submit@debbugs.gnu.org; Tue, 16 Jul 2024 04:45:15 -0400 Received: from mira.cbaines.net ([212.71.252.8]:43950) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sTdo9-00048p-DD for 72136@debbugs.gnu.org; Tue, 16 Jul 2024 04:45:13 -0400 Received: from localhost (host86-141-242-113.range86-141.btcentralplus.com [86.141.242.113]) by mira.cbaines.net (Postfix) with ESMTPSA id 4DA2D27BBE2 for <72136@debbugs.gnu.org>; Tue, 16 Jul 2024 09:45:10 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id fcd156f5 for <72136@debbugs.gnu.org>; Tue, 16 Jul 2024 08:45:09 +0000 (UTC) From: Christopher Baines Date: Tue, 16 Jul 2024 09:45:08 +0100 Message-ID: <7d092a3734bd2f988e03bfb28fb0ca6a0302cc86.1721119509.git.mail@cbaines.net> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Since I believe coreutils-minimal will fail to build for these targets, this will catch this early and display a clear message for both this package and packages using it as an input. * gnu/packages/base.scm (coreutils-minimal)[native-inputs]: Check the target if there is one. Change-Id: Id37cf6ac0b63226261a85a00699dfd06188c1475 --- gnu/packages/base.scm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) base-commit: bf6ab0e0f5066d999e027a7eb8ecf05db71123ce diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 66c5b7d237..05c3278e2e 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -67,6 +67,7 @@ (define-module (gnu packages base) #:use-module (guix utils) #:use-module (guix gexp) #:use-module (guix packages) + #:use-module (guix platform) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system gnu) @@ -76,6 +77,8 @@ (define-module (gnu packages base) #:use-module (ice-9 optargs) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) + #:use-module (srfi srfi-34) + #:use-module (srfi srfi-35) #:export (glibc libc-for-target libc-locales-for-target @@ -537,7 +540,17 @@ (define-public coreutils-minimal (inherit coreutils) (name "coreutils-minimal") (outputs '("out")) - (native-inputs '()) + (native-inputs + (begin + (let ((target (%current-target-system))) + (when target + (unless (platform-system (lookup-platform-by-target target)) + (raise + (condition + (&package-unsupported-target-error + (package this-package) + (target target))))))) + '())) (inputs '()))) (define-public coreutils-8.30