From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id qC9ZOKbL6mUoAwEAqHPOHw:P1 (envelope-from ) for ; Fri, 08 Mar 2024 09:26:15 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id qC9ZOKbL6mUoAwEAqHPOHw (envelope-from ) for ; Fri, 08 Mar 2024 09:26:14 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lunabee.space header.s=purelymail2 header.b=kgxa3xss; dkim=fail ("headers rsa verify failed") header.d=purelymail.com header.s=purelymail2 header.b=BmPDFmTQ; 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=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1709886374; h=from:from:sender:sender:reply-to: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=UwXDGx6iRrw/84IlYJXTrZCyL4Z9TijSVgs/PNZuGjw=; b=o/Y2gWmPnajmC4j3TBkloWjqkzLA00uAaBz/H1Ejhr86rAvdvfoYb3VBkvX2KAm48nU2yj Eyo3/VVUENkO5KgbyR95SOKTxNyllGO4uYBEgJ6yhb9aUpgT+C1EfJ0Lgjchyi2NoGJw1A mUKaW7mftzmeUj3pyztb21XsgNHsCar0FMEQdr1sZZNx0T9mCW3Ig7hf68obWh6FPnF8qn IYYevMBX8dcb6HJXEVQVpSqTulOV/QzpSVSVs4NvXaF8D5y208ap+JGeAZKtyEL3YF7R6Z 9ld2w0Rto3HYWA7PJE+MGjL6x3aHOQI33Q+sYQS/pajzgSYnOgPV4ZD1+AJ1kw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lunabee.space header.s=purelymail2 header.b=kgxa3xss; dkim=fail ("headers rsa verify failed") header.d=purelymail.com header.s=purelymail2 header.b=BmPDFmTQ; 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=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1709886374; a=rsa-sha256; cv=none; b=ZbYwM1FQHOoMy/Z0sNpMTn3Pcm9GADNrpbCtDeGEyUg3xYCthLLmzozdk1lmtUUXfW6qDL kyLRHexw6tlDf76i2FEvksLL0d6nrH8SZZhiJTvPVkNAVYzkmX7OY19QIZRG4173SqcTse /w6pdOLax17DemgGm9PaBJdFEz2dvy6bXyBfuaOyuZib2J1J79PeG1t9KL0ex9TDC7TRcl 6yG22gAzRjENiVq6NVay/QgB40jilXgCXcY1g8oLybXXyotc/cZ1N7WkF1elbqAvco9yn0 m3DKjciZLlGt5VfognmsqKY9MrDyV5xWX63jQW+RSsl0W6r+GFbQXdR0+ViUow== 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 C9FC645D51 for ; Fri, 8 Mar 2024 09:26:14 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1riVXz-0003y8-Vk; Fri, 08 Mar 2024 03:25: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 1riVXr-0003ty-BA for guix-patches@gnu.org; Fri, 08 Mar 2024 03:25:36 -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 1riVXq-00018E-Ur; Fri, 08 Mar 2024 03:25:35 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1riVYL-0002eR-Gv; Fri, 08 Mar 2024 03:26:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#69343] [PATCH v2 10/12] Simplify profile->boot-alternatives. Resent-From: Lilah Tascheter Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, rekado@elephly.net, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Fri, 08 Mar 2024 08:26:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69343 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69343@debbugs.gnu.org Cc: Felix Lechner , Christopher Baines , Josselin Poiret , Ludovic Court??s , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic Court??s , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 69343-submit@debbugs.gnu.org id=B69343.170988635210060 (code B ref 69343); Fri, 08 Mar 2024 08:26:05 +0000 Received: (at 69343) by debbugs.gnu.org; 8 Mar 2024 08:25:52 +0000 Received: from localhost ([127.0.0.1]:56417 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1riVY7-0002c7-Uy for submit@debbugs.gnu.org; Fri, 08 Mar 2024 03:25:52 -0500 Received: from sendmail.purelymail.com ([34.202.193.197]:44464) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1riVY5-0002bH-Sr for 69343@debbugs.gnu.org; Fri, 08 Mar 2024 03:25:50 -0500 DKIM-Signature: a=rsa-sha256; b=kgxa3xss7MFHtzV2fVT/hznNTG3DYmZkmXw0YSacjKY57Qmk8VE3xSdyCRtsf/ljt+Vx36UqaRCYTjiYkGcMTiXvEnmi5Aw6MWIMIqrFYXc3yjnpXTviG0M5WxOQ9UIh3hK6gz/9aJ8rD4ZEk9mHX5K2Yu20Tu6NeRxoZ5oX5QqseRLJHviupBbYwPk6PqjKFRKDGK84Jf3bt3OeupZDsVPQcUJ9+BPOaNuoFaI1ollrG2YxSJRAx18fqOwWuqXxJc9iWDzOGl3ZmwA5Y5ca6wkyqRoH7CebQZ2ttnj/CgkEM6liCEtrV3V2nHe6ejqYrvoNUxXf1yvOag5S/pRsWw==; s=purelymail2; d=lunabee.space; v=1; bh=KW0ToLgREhXbLWcQyyoGKh1GojWNPReOJ75CIYnPaeE=; h=Received:From:To:Subject; DKIM-Signature: a=rsa-sha256; b=BmPDFmTQDKaWRFWubW9Pymg1kyuBL2rLvWtj/EXLNJyMkS25gEbnqjJlu2/IawY5ACGFdGAK1qAAr5FbQiLXAiw0nQVqYxCdVO8oUcybcSJg0iz0oL3KGIIQ2eCAnuCNBZKvi/G4NGlYy0E+/q3JkEU//Tw5oBsjlOS4/504aTyWml/LgbLNfR+gBjGI1ot/FLQRmqQZTGkX6KCns7hC/T2lHgMNz/3wx5y9xJm48et3E0dVVE/tSeU7ADupPbDkLSQwNKKjuJ42MWLvrx4xwmiJnSyGJfyuTb/sUMdb5K0FB7slaDd2Ok5cOG+VERPu3bBHs13roCxKEhdy1NiZtw==; s=purelymail2; d=purelymail.com; v=1; bh=KW0ToLgREhXbLWcQyyoGKh1GojWNPReOJ75CIYnPaeE=; h=Feedback-ID:Received:From:To:Subject; Feedback-ID: 8937:2070:null:purelymail X-Pm-Original-To: 69343@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 637763825; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Fri, 08 Mar 2024 08:24:22 +0000 (UTC) Date: Fri, 8 Mar 2024 02:12:06 -0600 Message-ID: <12f5292170b873f491330a10a048af52232405aa.1709885528.git.lilah@lunabee.space> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by Purelymail Content-Type: text/plain; charset=UTF-8 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: , From: Lilah Tascheter via Guix-patches Reply-To: Lilah Tascheter 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-Spam-Score: -5.28 X-Spam-Score: -5.28 X-Migadu-Queue-Id: C9FC645D51 X-Migadu-Scanner: mx13.migadu.com X-TUID: BQDHjCziNcZ4 From: Felix Lechner * guix/scripts/system.scm (profile->boot-alternatives)[system->boot-parameters]: Rename to generation->boot-parameters and factor out processing from... (profile->boot-alternatives): ...here. Change-Id: If31eeb4cef4f5a107a0ee5ad3f117bf38629ac38 --- guix/scripts/system.scm | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index fd9f0727ee..3df37e5510 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -329,20 +329,16 @@ (define* (profile->boot-alternatives #:optional (prof= ile %system-profile) "Return a list of 'boot-parameters' for the generations of PROFILE speci= fied by NUMBERS, which is a list of generation numbers. The list is ordered fro= m the most recent to the oldest profiles." - (define (system->boot-parameters system number epoch) + (define (generation->boot-parameters number) (unless-file-not-found - (let* ((params (read-boot-parameters-file system)) + (let* ((system (generation-file-name profile number)) + (params (read-boot-parameters-file system)) + (epoch (stat:mtime (lstat system))) (text (boot-parameters-label params))) (boot-parameters (inherit params) (label (decorated-boot-label text number epoch)))))) - (let* ((systems (map (cut generation-file-name profile <>) - numbers)) - (times (map (lambda (system) - (unless-file-not-found - (stat:mtime (lstat system)))) - systems))) - (filter-map system->boot-parameters systems numbers times))) + (filter-map generation->boot-parameters numbers)) =20 =0C ;;; --=20 2.41.0