From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.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 6KzwOA+lRWcZogAAqHPOHw:P1 (envelope-from ) for ; Tue, 26 Nov 2024 10:38:08 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 6KzwOA+lRWcZogAAqHPOHw (envelope-from ) for ; Tue, 26 Nov 2024 11:38:08 +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=sHBLNI6t; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=nvsuCe7P; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1732617487; a=rsa-sha256; cv=none; b=hTj4mUVverk3NTFMQoAEJZDJtm8wSrhYOT/OOXvzJ3rMLr2xp3XCikdp1yINWSlQ1wj9ki 3WAz/ow78DQrcwDLgX25qfP2eR2PNSBUkgtsrTNzOBRXM8bWGaxKRhpClFTqiI7xo/Jlwr JGwT3zQD8sbEDPCz0BEGxuxEhrnqnbxQr6BVfv9g0EdRiqs1Ciia/DxElxedGhzg2fS6pD kQdUCuZ+0aIpzVwkoFJfwzpk8qXhYcShxC2gGLvpeGAQr27varLKoyG6HDRV0HOJIbExTI jrXgoKODq2aOYNFOiDFIExKd/TJRqNHd4GMegz+ufplCiol3uTO8A725YFjhxA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=sHBLNI6t; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=nvsuCe7P; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1732617487; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: 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:dkim-signature; bh=CoGqDz0fxhwpk2Eg8ySDIRaRYGrkmNVQjcD8SsCnGXY=; b=Nh8uenq9hjU8M/M8vt6UfQHSKnWpCF43ODuDOCj/Ghb3s5BM+JsnImAuyZUC0fZHZI6mgl tQxD+s61s7Epei4AWvyzmaPZeykB0QIy91bxgEyx2ObLMtB7eJNOun+7HNO2UBa9n8M63v r2PHkdk8CUYa6AcXjVeIBkjAXF6CUURjB8KkD0pchCcmXERHSTbvRYgU4ozPymrJyxeNmu oTuU0AoySYJENpMD2HhZPVNNAooC9nF3WUnfPZakOpWdbqO2t4wBoEn50UNTsHbmJOno4l so5UF1Q5R5CURDjjbQV+qeAd8qKapKrDyHTZrabLK2j/tDsFep5hNJPmW2lTgw== 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 D58B973DB6 for ; Tue, 26 Nov 2024 11:38:07 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFsxI-0005lJ-9e; Tue, 26 Nov 2024 05:38:04 -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 1tFsxH-0005kj-5F for guix-patches@gnu.org; Tue, 26 Nov 2024 05:38:03 -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 1tFsxG-00012Z-JF; Tue, 26 Nov 2024 05:38:02 -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=CoGqDz0fxhwpk2Eg8ySDIRaRYGrkmNVQjcD8SsCnGXY=; b=sHBLNI6tzv2jwYDIunmsgyxvGjwH7Ma1v8BbzxJhCzOlspKxSpJB0xEwsETm0VkSMsYObZhabzaHPK9Kj8TRimgvhoOCJ2nPjwpQKJneR0acxT4umHKxewIyC/dsLS5pe8KfyfL72xpkIQ+jX8bVZCioptckAF0o6RHSaAezDEr7QQcD0daYhYT4x/X4jhtH5VeEHKU3avpi2L6Kb3nLRIUe+ridlvE8Pe+48TRnq5UKNbD1yhUnVc5TnUU0iTmkAOcLdR2kKKaJ2J7AnJTF7GcQZlq1+CMKBRmY8JqlwruP6Yu2B2bRzBli7cbbNmSBgmyVmZIoquQB1CKK4E1umQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tFsxG-0002hW-D7; Tue, 26 Nov 2024 05:38:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74542] [PATCH 10/11] 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: Tue, 26 Nov 2024 10:38:02 +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 Court?s , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic Court?s , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 74542-submit@debbugs.gnu.org id=B74542.173261744210287 (code B ref 74542); Tue, 26 Nov 2024 10:38:02 +0000 Received: (at 74542) by debbugs.gnu.org; 26 Nov 2024 10:37:22 +0000 Received: from localhost ([127.0.0.1]:46264 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFswb-0002fm-MP for submit@debbugs.gnu.org; Tue, 26 Nov 2024 05:37:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60950) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFswa-0002fU-Ce for 74542@debbugs.gnu.org; Tue, 26 Nov 2024 05:37:20 -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 1tFsuO-0000Sb-2h; Tue, 26 Nov 2024 05:35:04 -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=CoGqDz0fxhwpk2Eg8ySDIRaRYGrkmNVQjcD8SsCnGXY=; b=nvsuCe7PDLUBiV2D+pS7 iVfKwwL3hwsUKIGOBDSdBaWu1fJVfQFyRvWcByBMh2feqnthEDgXdS/YA+Y64s03x+YIPd6YaDiSk gY6ynlsgWupQAPGmvj6RvuUTSOuRA8eBl1K620ljv6EHc8VCDbSk9z6wjTmbAOJNB61GMrNGPa0GU vo0mdxGGAnRHWTs6Liej5djHcQrIcnUgDP91xYZgKwBzz4aps5JdyuLibLYVx6NEo0RshC6BhT6A7 kBwYGlKL3bUBoLj9ZDT5IsFWP1i353tmlxPLY3cIA81jjqMgMGEym48eaaqNtB115/U6a0Q6pxnQR QV7OydSiuL6DaQ==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Tue, 26 Nov 2024 11:33:49 +0100 Message-ID: <5f26bd9db3ae03117474be2ec678d8dc72695102.1732615193.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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -4.79 X-Spam-Score: -4.79 X-Migadu-Queue-Id: D58B973DB6 X-Migadu-Scanner: mx10.migadu.com X-TUID: sD0FPNNuivQg * 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 565bfd48e9..1b0b006ad5 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))) @@ -699,9 +705,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