From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id SF59BKz37Gb/XwEA62LTzQ:P1 (envelope-from ) for ; Fri, 20 Sep 2024 04:18:52 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id SF59BKz37Gb/XwEA62LTzQ (envelope-from ) for ; Fri, 20 Sep 2024 06:18:52 +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="b9aF5/nD"; dkim=fail ("headers rsa verify failed") header.d=lunabee.space header.s=purelymail3 header.b=n7Dc9fsC; dkim=fail ("headers rsa verify failed") header.d=purelymail.com header.s=purelymail3 header.b=uzb+BWic; 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=1726805932; 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=mJb8zogLkciBCSKtTzIaU7yL8M3u+6r2DO6mrNaoYOk=; b=ndFkzSe55ovrgORTTeFxhjMiakbo1Kh7feK4qjoYkI7t7Z1nbVtdx8MqJnyopjtBdWLOuQ 3716evgJn5ujSc/JoV86CV6tHS4mk7YccwVpEbY96ihkwmdzkbtBeb6Q/RHIH/28terFXW oT8bCAOa8rCjAAnpRvRqRmsInwI+U5F08nBeNlYNN969xwG9c5ivlEBD2lPNg9QXRzS1hr U1PQX9AHHSo4QlBb2sD9NwxjnCLLT8bhdNSVg4gz64rMWK2sTJl4k7VfqMmZTcSCmV+iM+ IPfo50aH1sb0BVgEakfc0aDvEqES7JDoGYbYA7lvK2UagXbhqmOpujQjBFphIw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1726805932; a=rsa-sha256; cv=none; b=PYumljMD4DXX9jnmjMWOXwBmnVC7dIm6TtXpGm6cVqII6KzHWKHk1ieMxZ6wXF3Ll50SgM l8a2jKYOusn2YMOMYDhk/TdSC+oZgChGZrOihQTY8JV5MtnJO4v+7DUxpUdPUZ/X4SkOST KXTPklp9RQDpiyNwS0eKirNKeDyeIu2wVdNw83PZ6EfswXStvBClbHKX6LmoL6RYORczzC 3RglGaQ90pDraS2lxI+DT1EMgCydyNPM3i1eH6Qc0pToCZ4Jqo597dOBoT2yqDOu7XfjXL AbAlD8kz0Jc7QPqtY3P8CqF9dtoGst4t7jgkOE26Rc10HV6/HK6ts6fDah+/Mg== 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="b9aF5/nD"; dkim=fail ("headers rsa verify failed") header.d=lunabee.space header.s=purelymail3 header.b=n7Dc9fsC; dkim=fail ("headers rsa verify failed") header.d=purelymail.com header.s=purelymail3 header.b=uzb+BWic; 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 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 D385B60319 for ; Fri, 20 Sep 2024 06:18:51 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1srV5l-0008Gn-EN; Fri, 20 Sep 2024 00:18:01 -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 1srV5Z-0008BX-Fa for guix-patches@gnu.org; Fri, 20 Sep 2024 00:17:49 -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 1srV5Z-0006GT-6o for guix-patches@gnu.org; Fri, 20 Sep 2024 00:17:49 -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=mJb8zogLkciBCSKtTzIaU7yL8M3u+6r2DO6mrNaoYOk=; b=b9aF5/nD7nFgu+tXSn7/8WhzuwFe649wmag2fNG+lCMTb8yiTATwhS19DJTyFok81M6X7vCPMntcai8S6cs9byDDVyGMdfqS2PVHHkOC8tVlIuVrmMTB1TZubuTdSop12t4XSQYMY5QIrz0paX0O6ie4/nFqJinO6YzVGqzF6qeLG2SIic6PAHpE4UuwRB24EIDTPmx0k8h9EO4EcYjF3bTCtCA3gekKjwz/XQWSXsSbvUKXsIk88PxwxhXdAP2ZrlCmnQYbTPWwabQ6GRIP/QksPYBnCpnnW2cSXQkk8E8Fn9Pam62NGgjVgWddwPqi6a3RL83sbikQ/ck3mQGOBA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1srV5r-0005Uq-GE for guix-patches@gnu.org; Fri, 20 Sep 2024 00:18:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#69343] [PATCH v4 08/11] Give a separate name to a commonly used expression. Resent-From: Lilah Tascheter Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 20 Sep 2024 04:18: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: Herman Rimm , Felix Lechner Received: via spool by 69343-submit@debbugs.gnu.org id=B69343.172680588421062 (code B ref 69343); Fri, 20 Sep 2024 04:18:07 +0000 Received: (at 69343) by debbugs.gnu.org; 20 Sep 2024 04:18:04 +0000 Received: from localhost ([127.0.0.1]:33777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srV5n-0005TT-Lx for submit@debbugs.gnu.org; Fri, 20 Sep 2024 00:18:04 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:45866) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srV5g-0005Rm-Ns for 69343@debbugs.gnu.org; Fri, 20 Sep 2024 00:17:57 -0400 DKIM-Signature: a=rsa-sha256; b=n7Dc9fsCHGIqmT8CxI+iNHoZLp1ykUQRibyYyj2WwNd77X7q4pgZ6xCiMJm0noQjei06SWyLB6MqKaRa6yafZGmnWz5dOk7LzRWuFp9Hp/ADVyENGPTZRGI0UBSg7f0A/xXq0cBmNxQjrVtOfz+wTKTyie/hFCJfcM+eci4oN7Grl0bJrwb+ElXHYSj6h2nc6IaDh9rkIZ/jnYZqaufSZ4lgYr85Q1mi4EmErMmyUTJ4dLLfIGnnFpGn8xFTDE/w5+LkDwoYVAxGSe15yw61NBLA9MiFf/JFKPXuRcwxDNA2aappiwOuve8RX9YWTC5RW03q3mk2mB2Ji11XYvqrTQ==; s=purelymail3; d=lunabee.space; v=1; bh=tUvD0ZLiDclvWKVBcWJbB0D6FAVkMJQpUX9BbzR++hc=; h=Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=uzb+BWicjSXZXDruVLtzb8B05JHGjR7yxe+/ldYuN2F23qvetEKzZWzSmLMfUaDvhQkVF1fVuE6mXu6PjMtR/GsLYU0fBPWONuOBxMU3eFMs/LWdDY/gWy6m0KCjihyDq6uGOQ09Ez/gRGYpD1ZVq9E0/LLGsNZCW8yX4bcsXl9X/vszAnttsTMWZB+F7yE2jg1jMRkkcNwHuBRbv9O+l758doTM5rqT1b0vCuJQAXxfeQHUm8nOxp8hqhCWA2ycoITwnque3dfS+gznDjPGNTX+BKQvV30yXZBkd5HfYwIEtxAjTak36uCDQ/A0P2OBlOEj0MkwXOb/Hhn8N+5tCA==; s=purelymail3; d=purelymail.com; v=1; bh=tUvD0ZLiDclvWKVBcWJbB0D6FAVkMJQpUX9BbzR++hc=; 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:18 +0000 (UTC) Date: Thu, 19 Sep 2024 23:16:02 -0500 Message-ID: <6e4fc53df2ff12590bfa557c38f4ea03446f5749.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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -7.01 X-Migadu-Queue-Id: D385B60319 X-Spam-Score: -7.01 X-TUID: n+shbpIo4stK From: Felix Lechner * gnu/machine/ssh.scm (roll-back-managed-host): Factor out a subexpression into new variable parameters. Change-Id: I8d70684142bea736042d6c9dc8276ea7bdb9c181 --- gnu/machine/ssh.scm | 47 +++++++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/gnu/machine/ssh.scm b/gnu/machine/ssh.scm index a96ca68f47..37806a2e1b 100644 --- a/gnu/machine/ssh.scm +++ b/gnu/machine/ssh.scm @@ -580,31 +580,28 @@ (define (roll-back-managed-host machine) (define roll-back-failure (condition (&message (message (G_ "could not roll-back machine"))))) =20 - (mlet* %store-monad ((boot-alternatives (machine->boot-alternatives mach= ine)) - (_ -> (if (< (length boot-alternatives) 2) - (raise roll-back-failure))) - (entries -> (map boot-parameters->menu-entry - (list (second boot-alternatives)))= ) - (locale -> (boot-parameters-locale - (second boot-alternatives))) - (crypto-dev -> (boot-parameters-store-crypto-device= s - (second boot-alternatives))) - (store-dir -> (boot-parameters-store-directory-pref= ix - (second boot-alternatives))) - (old-entries -> (map boot-parameters->menu-entry - (drop boot-alternatives 2))) - (bootloader -> (operating-system-bootloader - (machine-operating-system machine))= ) - (bootcfg (lower-object - ((bootloader-configuration-file-generator - (bootloader-configuration-bootloader - bootloader)) - bootloader entries - #:locale locale - #:store-crypto-devices crypto-dev - #:store-directory-prefix store-dir - #:old-entries old-entries))) - (remote-result (machine-remote-eval machine remote-= exp))) + (mlet* %store-monad + ((boot-alternatives (machine->boot-alternatives machine)) + (_ -> (if (< (length boot-alternatives) 2) (raise roll-back-fail= ure))) + (parameters (second boot-alternatives)) + (entries -> (list (boot-parameters->menu-entry parameters))) + (locale -> (boot-parameters-locale parameters)) + (crypto-dev -> (boot-parameters-store-crypto-devices parameters)= ) + (store-dir -> (boot-parameters-store-directory-prefix parameters= )) + (old-entries -> (map boot-parameters->menu-entry + (drop boot-alternatives 2))) + (bootloader -> (operating-system-bootloader + (machine-operating-system machine))) + (bootcfg (lower-object + ((bootloader-configuration-file-generator + (bootloader-configuration-bootloader + bootloader)) + bootloader entries + #:locale locale + #:store-crypto-devices crypto-dev + #:store-directory-prefix store-dir + #:old-entries old-entries))) + (remote-result (machine-remote-eval machine remote-exp))) (when (eqv? 'error remote-result) (raise roll-back-failure)))) =20 --=20 2.45.2