From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.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 8GiHJIb37GahHAAAe85BDQ:P1 (envelope-from ) for ; Fri, 20 Sep 2024 04:18:14 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 8GiHJIb37GahHAAAe85BDQ (envelope-from ) for ; Fri, 20 Sep 2024 06:18:14 +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=Jb+rP136; dkim=fail ("headers rsa verify failed") header.d=lunabee.space header.s=purelymail3 header.b=Z7gGcFRH; dkim=fail ("headers rsa verify failed") header.d=purelymail.com header.s=purelymail3 header.b=XqSx6r2l; 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=1726805894; 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=EYjFGh7yYzWac4upZEvd8rHuE/s3PZ6MKImBHID+FxY51OrbFFRHFUCz/dYr9TlzkJobhu /q7Q1cZM69LQtUqbLsEvzDevaositVrNW9ozDsQu+R3AgDpn3BMTVRej5jUra+DEplT/+m itHbNrvT5Cpem42dLNi08R6V8ZGST7esOdW/NyLp2pTR8rIWV+jRbbOgd4jfqTGAlYXEMM TCVlVV4DqB3cVymOEd+RPUe89eImly4Ttv9DJq8cLVIdwBCZ8OQiv0g63U64KUpqqmIcF+ 3OfvjpFN84FkDCzrjO5MXu/MUyp8OLMan36pPsC7wHmI4mkCpPAWElYeEJebuA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1726805894; a=rsa-sha256; cv=none; b=J/Ge1e9ZcyoyU3o8TQvFvFIHqlsVPhXXpOXg6JWCJywzRCijJt8Ars0CxyhxoV+KHlLKJr LiK63G5at5W6S9iWNzw0QL1V0Fzh8cR2r86CeZTyjY1U0agQKsAxzdcpssNSyzViOzAlvo vQhakFjjbyMejOITM2R2JwutBGcpw1oIFWyRnr6tz0xnmQ0cX+j1khyuwRjCLPK127HBfB R8QQYZxU/mRQERLArQVycGtmn/rB4unTLgtAQ/itZulaDjpqvkTqvI7cxPZwzHvsdbdGMI T+R/47s7WIwic221f+YaMYSWqi8Ubmy4Juwob0+c//AOBhCX3hCB2V0Lo5S2EQ== 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=Jb+rP136; dkim=fail ("headers rsa verify failed") header.d=lunabee.space header.s=purelymail3 header.b=Z7gGcFRH; dkim=fail ("headers rsa verify failed") header.d=purelymail.com header.s=purelymail3 header.b=XqSx6r2l; 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 8218D73B96 for ; Fri, 20 Sep 2024 06:18:14 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1srV5f-0008DO-4m; Fri, 20 Sep 2024 00:17:55 -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 1srV5a-0008Ck-Lt for guix-patches@gnu.org; Fri, 20 Sep 2024 00:17: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 1srV5a-0006Go-CF; Fri, 20 Sep 2024 00:17:50 -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=Jb+rP136NbRbEt5vBVaJD/X5xEL+kWxZ5v+rlStGp5VK8rCMqgroYxp7a9Zx6kyVzWCnY60w8NPP15zlk3eO9Q0bM/9unt564aEsYoymnLIXIzZouct0r18vpC6a+vyjaZKC7zTSQLUPeTMu37Nuokt9X65z7JEu9EhrsmWv8NKnL0JJWUFpZyT/35fnLusEpfFCZbbg+0s7CK8/9xYGajVexo/0G0o4gK/P1NikigS8V9HVoGf5Fuz9L8QMD5K6vM+WEMxTnBb4rNCKcG4ZuFj0QWSftD6gaKLVZrbOQHan6mSFgdHHDhT89UgoJ6DlIS42b2v98vRxGJsgnYiMEQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1srV5r-0005Ug-0T; Fri, 20 Sep 2024 00:18:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#69343] [PATCH v4 09/11] 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: Fri, 20 Sep 2024 04:18:06 +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: Herman Rimm , 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.172680587820989 (code B ref 69343); Fri, 20 Sep 2024 04:18:06 +0000 Received: (at 69343) by debbugs.gnu.org; 20 Sep 2024 04:17:58 +0000 Received: from localhost ([127.0.0.1]:33761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srV5h-0005SM-Vj for submit@debbugs.gnu.org; Fri, 20 Sep 2024 00:17:58 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:49290) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srV5f-0005Ri-TA for 69343@debbugs.gnu.org; Fri, 20 Sep 2024 00:17:56 -0400 DKIM-Signature: a=rsa-sha256; b=Z7gGcFRH42ouJUBrC0jepZS1ktTdpjQhORxFfBFBLpWlncOMnbP8Rz04cfhh45Eiurg8iJmPA+dKZAvogpbMiKuXWoXUbkxuss+YVqejdPGsw92v052pT/T/knsXrzFJ4xqS/68JujQXjpCdI6dMIrUAajq+JV0dAIgI15W9yr3xJpjJkIPqkF3UQmm5DD1rNEQekbTDk8D7gkK+hXSUUR1zwOxq5Dr017hEeBryVGyZl0SrB6xHKYs0W7cFcsFjbhBe0523PL3NCduxLXyYu08aevVmSFQdzy7c/VheittESOV7QRHqYMcypPs5rzfHO5GuTtS25cmWcbHFkBpcyw==; s=purelymail3; d=lunabee.space; v=1; bh=NWG6NUH0mK7gkG+sq9A+xR0W0wwVR7O7WawedBxVieU=; h=Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=XqSx6r2ltKsSS4M22PWdusyBYhIN86heZBGfEsSRrAoIXK1MPzDFg4RIkyzTQ8Oc1iTKKMiBatLD880f5PiFXntZxjS1JQ3aPugLYOoC5/rBm4J5EsezitYfcMsHp6ICaklJTUXvZsm9kwaF5tooHyIvGzN17W9AHWnkQg+PBoaMyL9am9yKcXYwjIREW0RBMB8Fjbp7mid7ogPk4iPzCFkoQNON2hXJnYTYalXOVi4Y+0oNsiypQgryPYM6j2CygsAke0/ZkHW+/c+7B+uu79E9+eV7lk1JQQv8TG6sOZbPwXJLMlTEEECP3a/t9S8LcvOdvGoXMeFvlpK1h/61/g==; s=purelymail3; 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 -100958845; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Fri, 20 Sep 2024 04:17:19 +0000 (UTC) Date: Thu, 19 Sep 2024 23:16:03 -0500 Message-ID: <5cfea442dfbae70e44123556783d4df9e69113be.1726805765.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-Migadu-Spam-Score: -3.41 X-Spam-Score: -3.41 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Queue-Id: 8218D73B96 X-TUID: 8sevzIAwOwKR 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