From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.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 gYP8Mq6MSWc/bwEA62LTzQ:P1 (envelope-from ) for ; Fri, 29 Nov 2024 09:43:10 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id gYP8Mq6MSWc/bwEA62LTzQ (envelope-from ) for ; Fri, 29 Nov 2024 10:43:10 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=VOoinOIA; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="U/huP6mw"; dmarc=pass (policy=none) header.from=gnu.org; 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" 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 839555CB76 for ; Fri, 29 Nov 2024 10:43:10 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tGxWO-0000s7-FX; Fri, 29 Nov 2024 04:42:44 -0500 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 1tGxVp-0000fm-62 for guix-patches@gnu.org; Fri, 29 Nov 2024 04:42:14 -0500 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 1tGxVo-0004a9-RS; Fri, 29 Nov 2024 04:42:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=HB1jDZjF+USzml5XD8PWIalZQ2+ZvjbRkFumUMAyKv4=; b=VOoinOIANAPufpNNniVbsyyvKhIBFSJCaMSXSY2tUqu2GUOscvRO58jiU+SWJAX95bR6NXuPN/u8juJNjJlP9QYt8fKeBQ27MmEpx5HvBDCwjUpp5r8w5Tu37Uuto3heEweMMm8P8OtJEAVPbhyZDrGUS7ypf+ZX+j2VFqb9fq70JLj9/ZMiW36BBk93gJkimcnsV20h1WWXrcQeqIi79ji+87YKaX1iIZMAvez0Dhz4JCobpw5nZcNgfnFTrMqLeTAYRlyMD7YL4DJ7zw13X39Qp43MaNNhWvozfKzpQjq1zrVddr8U7CW9tCHQ6IriU0YLNlXdZpQMi3fhEV+oKQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tGxVo-0005xu-L9; Fri, 29 Nov 2024 04:42:08 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74542] [PATCH v2 13/16] guix build: Validate that the file passed to =?UTF-8?Q?=E2=80=98-m=E2=80=99?= returns a manifest. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= 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, 29 Nov 2024 09:42:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74542 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74542@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , 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 74542-submit@debbugs.gnu.org id=B74542.173287328822736 (code B ref 74542); Fri, 29 Nov 2024 09:42:08 +0000 Received: (at 74542) by debbugs.gnu.org; 29 Nov 2024 09:41:28 +0000 Received: from localhost ([127.0.0.1]:41077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tGxV9-0005uY-Pw for submit@debbugs.gnu.org; Fri, 29 Nov 2024 04:41:28 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57476) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tGxUq-0005rN-3O for 74542@debbugs.gnu.org; Fri, 29 Nov 2024 04:41:08 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tGxUk-0003tg-N8; Fri, 29 Nov 2024 04:41:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=HB1jDZjF+USzml5XD8PWIalZQ2+ZvjbRkFumUMAyKv4=; b=U/huP6mwtHN+zB3VJ+P8 k33a9OvUE1B426y6uJEOloyYaHDLPpt/LyYrpGWZyyUxAzbIOZ0gFuBKdu1l/bh0xRHjYDw5ZkknV 2pEAxudoSL1j8gjXZ0F3VuMPY+4apTV9VrZ8GAjN02ABWOwHEd974hTPGusJFh5GjPELyD3sCxGxf GWzAIdrSDDgs58BoD68fN3u0+GKhGTb5XQh89w27ElTppqnDFOTjmT8aAUeWfzSDPsq+v3kC9GgSI xzX8y8oXApGMEi7e7n3Y+rdmTyKcIccvkRwJhFZmD5smTtspSh7GYhm9GjmJIKwpCfFXxIhVcCrT6 1sOsM7chFCHrzw==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Fri, 29 Nov 2024 10:40:16 +0100 Message-ID: <3226de68aaff509d5e38e2344cf428cf27e68aab.1732872499.git.ludo@gnu.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 839555CB76 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -5.01 X-Spam-Score: -5.01 X-TUID: Heru2BHEmQpK * guix/scripts/build.scm (options->things-to-build)[ensure-manifest]: New procedure. Use it. Change-Id: If64c483d7079f441a296d5bd4e06e67f44cbb7bf --- guix/scripts/build.scm | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm index 5c93dc78f8..d1368f7e48 100644 --- a/guix/scripts/build.scm +++ b/guix/scripts/build.scm @@ -629,6 +629,12 @@ (define-public my-package (for-each validate-type lst) lst)) + (define (ensure-manifest x file) + (unless (manifest? x) + (raise (formatted-message (G_ "file '~a' does not return a manifest") + file))) + x) + (define system (or (assoc-ref opts 'system) (%current-system))) @@ -701,9 +707,11 @@ (define-public my-package (loop tail 'regular (append (map manifest-entry-item (manifest-entries - (load* manifest - (make-user-module '((guix profiles) - (gnu)))))) + (ensure-manifest + (load* manifest + (make-user-module '((guix profiles) + (gnu)))) + manifest))) result))) (('expression . str) (loop tail 'regular -- 2.46.0