From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.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 6EWzCt3yrmaB/gAAe85BDQ:P1 (envelope-from ) for ; Sun, 04 Aug 2024 03:17:49 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 6EWzCt3yrmaB/gAAe85BDQ (envelope-from ) for ; Sun, 04 Aug 2024 05:17:49 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=ZWoj9LKE; dkim=fail ("headers rsa verify failed") header.d=lunabee.space header.s=purelymail2 header.b=YYwsZqOf; dkim=fail ("headers rsa verify failed") header.d=purelymail.com header.s=purelymail2 header.b="C/Tski/r"; 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=1722741469; 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=3vJs6hPqNL85y9eyKAWNH9jAawLjkkIzXe+vUd+liNM=; b=c3FKblOM3YXGQbOSxudsESjoMkEy0m8ME03GkuKSE00EL2T92jTHMVZQepbv1YT7TyO95/ t6IPuYEY2o02BVElOz56dJb39zRfnYIqXLBzRcNiSamwl7djFE3HvjDA/ZD5aw0+DLs7oD FAmjfTGb9aoWZf4IEbm92kol0qZv05yRHFpfH03AC6JEo2LBroymGtWONMg7hGicBCcuaG 9ISzaGU/BjbJA/dOqNcfbk5OsOKoI1C2WX2IT7Ot2LtFckHVYulZuT4DNYGgGOJIXdAolM xFA8Xh5g8b0M6w+knAgdZQTD2AmEPm8WY99NvjMlT/HSKyFYNi9NmzVvqJMpKA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=ZWoj9LKE; dkim=fail ("headers rsa verify failed") header.d=lunabee.space header.s=purelymail2 header.b=YYwsZqOf; dkim=fail ("headers rsa verify failed") header.d=purelymail.com header.s=purelymail2 header.b="C/Tski/r"; 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=1722741469; a=rsa-sha256; cv=none; b=W6N1ZF8YHXcsQrjF0lGZ/WkRjwpIjOIUHmnODZURODLXMZcLoW7CeWIN4kV+kkzIqAWw3b L9AIJwtPq2ZCjdLxNFMeBKoaY4H98Fv0/WT3fQi+kvM8d6CGDjFHMjDKuQF8326v6e9Evk HUqyAgsEoklj33L/SwBt6CXWNeG6GmyPXpRh7Ypm3mwSkkFwrxVZZT3tTZrmevi3PQx1RS LwrQxl++dqJrepNlsgRGFNVGlX2lfrPtKMZyAdYEtqryMNkipyX8VrduSLbnziTZVP6KlP x9VFxJ61EA0lkDICzajTK7ncW9iUjZh9hvjHBN0uPx4nBTBZJS5tJfRxLkj0kw== 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 00F576DB4C for ; Sun, 4 Aug 2024 05:17:48 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1saRjx-0003mX-Tz; Sat, 03 Aug 2024 23:17:02 -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 1saRjk-0003kU-2i for guix-patches@gnu.org; Sat, 03 Aug 2024 23:16:50 -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 1saRjj-0002Qr-Ow; Sat, 03 Aug 2024 23:16:47 -0400 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=3vJs6hPqNL85y9eyKAWNH9jAawLjkkIzXe+vUd+liNM=; b=ZWoj9LKEWj91mCgE3y1koSo/+qj4JDo2Y3dZGmTKOFWvEXcdWzxgFUgvhpNZkUHTKvleHHG5M4YrRBEBo8r0Qx5qqsCeCaedPU73C5SZ+UocI6M7ZXDRstlIiq1fh/UkYfmThgN+w6wvB1q1JBNZjuyZxn+4IYkh1NFwfMVZjJIrCNw0Pz1WNg41kMvddxhx6PDMG597cI6nGh/Sh4Oo1xv2KVsOfbjXKEQ1Q97QI+WeA5HL8YOEj3XFGBNDfYC2zRDfiKtcgf49QL1PQ9SmzAgRq7EySS0JsG/AlGnspCKRh9sF6HZZcTvu4oXycEKFvjjxbM5sfslIdDi3RAjl1Q==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1saRk3-0007oi-MF; Sat, 03 Aug 2024 23:17:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#69343] [PATCH v3 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, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Sun, 04 Aug 2024 03:17:07 +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 , 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 69343-submit@debbugs.gnu.org id=B69343.172274141029866 (code B ref 69343); Sun, 04 Aug 2024 03:17:07 +0000 Received: (at 69343) by debbugs.gnu.org; 4 Aug 2024 03:16:50 +0000 Received: from localhost ([127.0.0.1]:55027 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1saRjl-0007lb-Io for submit@debbugs.gnu.org; Sat, 03 Aug 2024 23:16:50 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:56590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1saRjk-0007kq-7M for 69343@debbugs.gnu.org; Sat, 03 Aug 2024 23:16:48 -0400 DKIM-Signature: a=rsa-sha256; b=YYwsZqOfkYX9rIPXhPn5svMlP/ILeLHTsIHaT1FuDGxP8T1qilzniIlOrxmv8t4pVOxWUfTBG5lswy3mGOsNK/mPu8tKNYHWW3e4mvyALSeUtH2tefUmvJurmZ+PxWqpsF6KDY1Sq3AlL2IkVo1er9+YinBlF+wjcMeJpxpIRlTMQwD+SUy4VDF9em3v0LLu50hUGvesNQvoGwQq5206nz3JF5QWKvfWyx+zKmDxI4FwCral2qJQz9AFalfsChKh84vJthJIjO5r8s0jBqMdV7Kwh7RaoVRPg3zgn9sdt6LZyOTdCJqHPITZ0TkH8CdkHWpQQRf/O1Jz1ILt04/Mrw==; s=purelymail2; d=lunabee.space; v=1; bh=NWG6NUH0mK7gkG+sq9A+xR0W0wwVR7O7WawedBxVieU=; h=Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=C/Tski/rxLHcqwLFnr3W1xs3s1wkXuQqoxL1rgPZsuqGYvylYi/ltwvLfxaoTPcLgTah9SG2jZBUX3teATL5BEmVVt7beg5D5f+mWiMGAW5DY8Kv7fKAWr18HIufTgemGMgjF1FORP7UX4VmmeXqvyTm2v2YCwRn7yHDfQVfskMD//nGONvvPaYNUChX+pzzQsqA6KBew74RJnxJyd8on4eYC2F0Q11ARvgGpwuA+N6qzoYnaZZxAaFaEHV600F5tJcNvbp6N89fpIlPoeGSCr+saugPr8XfOdiw/CYBkLYs7Kq/2exSID82j/IOiSxoiXwIX9ceaK0ErDJn3iApiQ==; s=purelymail2; d=purelymail.com; v=1; bh=NWG6NUH0mK7gkG+sq9A+xR0W0wwVR7O7WawedBxVieU=; h=Feedback-ID:Received:From:To:Subject:Date; Feedback-ID: 8937:2070:null:purelymail X-Pm-Original-To: 69343@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id -2124817350; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Sun, 04 Aug 2024 03:15:41 +0000 (UTC) Date: Sat, 3 Aug 2024 22:13:32 -0500 Message-ID: <6b454e5cd048626a4f32bcec0d135f700f705b92.1722741214.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-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -5.44 X-Migadu-Queue-Id: 00F576DB4C X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -5.44 X-TUID: 2Gih9GTNQEha 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 cdd78a7849..a4dd7a8054 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -334,20 +334,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.45.2