From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2Hz1LdXnHWKoJgAAgWs5BA (envelope-from ) for ; Tue, 01 Mar 2022 10:31:01 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 4HQWK9XnHWL0gwEAauVa8A (envelope-from ) for ; Tue, 01 Mar 2022 10:31:01 +0100 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 3D2A138A92 for ; Tue, 1 Mar 2022 10:31:01 +0100 (CET) Received: from localhost ([::1]:47900 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOyqR-0001k0-P4 for larch@yhetil.org; Tue, 01 Mar 2022 04:30:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOydu-0005Ae-A6 for bug-guix@gnu.org; Tue, 01 Mar 2022 04:18:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:41523) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOydu-0007xF-0F for bug-guix@gnu.org; Tue, 01 Mar 2022 04:18:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nOydt-0001pL-MB for bug-guix@gnu.org; Tue, 01 Mar 2022 04:18:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#40998: [PATCH 1/4] system: Add a version field to the record. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 01 Mar 2022 09:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40998 X-GNU-PR-Package: guix X-GNU-PR-Keywords: patch To: Maxim Cournoyer Received: via spool by 40998-submit@debbugs.gnu.org id=B40998.16461262276941 (code B ref 40998); Tue, 01 Mar 2022 09:18:01 +0000 Received: (at 40998) by debbugs.gnu.org; 1 Mar 2022 09:17:07 +0000 Received: from localhost ([127.0.0.1]:35417 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOyd1-0001nt-Bi for submit@debbugs.gnu.org; Tue, 01 Mar 2022 04:17:07 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:57890) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOyd0-0001nN-Df for 40998@debbugs.gnu.org; Tue, 01 Mar 2022 04:17:06 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id B6724504; Tue, 1 Mar 2022 10:16:59 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HP2_BFfKGrq0; Tue, 1 Mar 2022 10:16:59 +0100 (CET) Received: from ribbon (unknown [IPv6:2001:660:6102:320:e120:2c8f:8909:cdfe]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 9C7F82D9; Tue, 1 Mar 2022 10:16:58 +0100 (CET) From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20220228225047.11105-1-maxim.cournoyer@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 11 =?UTF-8?Q?Vent=C3=B4se?= an 230 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 01 Mar 2022 10:16:57 +0100 In-Reply-To: <20220228225047.11105-1-maxim.cournoyer@gmail.com> (Maxim Cournoyer's message of "Mon, 28 Feb 2022 17:50:43 -0500") Message-ID: <877d9e822e.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / X-Rspamd-Server: hera X-Rspamd-Queue-Id: B6724504 X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_SOME(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 40998@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1646127061; 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; bh=B8Tkml20+lZPBc36+RKgfRkJbt/W0bNCQ+BxeFxoCIk=; b=eRxDiq38CUA5pHTW081qfjx7M1eu+pzv0UdX8a6ACetOxUgsmd/SR6IxZfy837Kv5rwCCO hwTa41KBUh/J5fOiUQ5g2lSjAb30QrgxFYLlJYgH/WZqRvECRzD4fzh8V27EC1egV355ac 9ai25EfaTsHVWbUWQ92XD+LXDygQbohoP1n39qswWvT9Y1065vp/MwBbBt1+EsOqm2Kvos iNzMFzhTIlSrhxKEktGn62ZhR/4LakAQsWttOA4Amwtyd5VYB8UUOIWv9GUPyFcyx0zI5b nlC3B5D1YhBZFUqKWQvdRFU5sDaLC7c93+ingihgyi4ClgPYtXlF5nRXgKRlow== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1646127061; a=rsa-sha256; cv=none; b=HBugL8JozyFsTYK0/MtH8ujVqDm0fQC3CMvzinPWCQenWzIXul1PtFGEF6OxWZ1/jnm2Bb zVD/vLd4SPMT1IGTgVgelJHhcMq6VeH8NwT6VRxlb7/AhUh2+YGxhmO9zfa1BHQNR1lylH ob+DuimWqAxWiYNQdJ5jcXWoqljjRHoOPBC3N5iV9Bmxblnrz5FvOP05g2PjaxuBpvA1z/ gaCeaPcCO/aSCPxzqFNwLC0dcCVgn81SNaoQBFmvWjURrHTY0zjrNdpeCt8L/XCrjGGhM1 K01qASZ/R12ea46VSC5RzqNy6P0hin2UhAMFI/PFHI2h7IlTygB7G9MspPZ9gA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.89 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 3D2A138A92 X-Spam-Score: -4.89 X-Migadu-Scanner: scn0.migadu.com X-TUID: WVSeNvVYHEqA Hi! Maxim Cournoyer skribis: > This version field exposes the (already present) version information of a= boot > parameters file. > > * gnu/system.scm (%boot-parameters-version): New variable. > ()[version]: New field. > (read-boot-parameters): Use it. > (operating-system-boot-parameters-file): Likewise. > * tests/boot-parameters.scm (test-read-boot-parameters): Use > %boot-parameters-version as the default version value in the template. [...] > + ;; New versions are not backward-compatible, so only accept past and c= urrent > + ;; versions, not future ones. > + (define (version? n) > + (member n (iota (1+ %boot-parameters-version)))) > + > (match (read port) > - (('boot-parameters ('version 0) > + (('boot-parameters ('version (? version? version)) I still have a preference for an explicit list right here, for clarity, and so that we don=E2=80=99t unwillingly find ourselves treating any past version in the same way in the future. I think I wasn=E2=80=99t clear about it (sorry!) but I wonder if we could, instead of bumping the version, use something like: (find (cut string-prefix? "gnu.load=3D") kernel-arguments) to determine whether we=E2=80=99re dealing with an =E2=80=9Cold-style=E2=80= =9D =E2=80=9Cparameters=E2=80=9D file. If that=E2=80=99s not possible, then what this patch is doing SGTM. Thanks, Ludo=E2=80=99.