From patchwork Fri May 9 06:02:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herman Rimm X-Patchwork-Id: 42471 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id CE1D227BC49; Fri, 9 May 2025 07:04:27 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 89F6627BC49 for ; Fri, 9 May 2025 07:04:27 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uDGq9-0004cg-7B; Fri, 09 May 2025 02:04:09 -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 1uDGq3-0004bv-RE for guix-patches@gnu.org; Fri, 09 May 2025 02:04:04 -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 1uDGq3-00039x-JL for guix-patches@gnu.org; Fri, 09 May 2025 02:04:03 -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=A0OT8GbcURu8PLGiAj++IjE06n0Ltb5bVSP75tS3CNI=; b=lhh/mNI0tveuAFxdv85GY+iUaQ0OpBnsiBkY1B7AaYHbXr4EPaVu+TaYxy/JWSRx/I82a+VrMqpin9O85xIiL2r4U72aeLZOwYs12A+JJG/IrhJXINvXJWG3CxZ1Ifxx1mIGTGTKPVv35ZTPhiuVjyW7IkPUjInVjVMWQDzT/Lj9gBn2c4rdEwRKRvzArDbB4xUlnKWtCk5gGUkxSP8rXcUwzkLidhBKExzQFC2knkf+02RJm6e2G4MiJEWSa2Fx6R1t53ME0jm0ExN87OJPKqN/Rhk4h2AlQoVRljgN87pzMtCLE5vh5OdOGdcp6IE0/z9Ut/zgGCZEhEE64Ni87w==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1uDGq3-0002Zk-Ec for guix-patches@gnu.org; Fri, 09 May 2025 02:04:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#75010] [PATCH v4 2/5] Rename two remote variables confusingly named 'generations'. Resent-From: Herman Rimm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 09 May 2025 06:04:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75010 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch moreinfo To: 75010@debbugs.gnu.org Cc: Felix Lechner Received: via spool by 75010-submit@debbugs.gnu.org id=B75010.17467706229832 (code B ref 75010); Fri, 09 May 2025 06:04:03 +0000 Received: (at 75010) by debbugs.gnu.org; 9 May 2025 06:03:42 +0000 Received: from localhost ([127.0.0.1]:34615 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uDGpi-0002YQ-0B for submit@debbugs.gnu.org; Fri, 09 May 2025 02:03:42 -0400 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:50871 helo=email.rimm.ee) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uDGpb-0002XI-C4 for 75010@debbugs.gnu.org; Fri, 09 May 2025 02:03:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1746770603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=A0OT8GbcURu8PLGiAj++IjE06n0Ltb5bVSP75tS3CNI=; b=JA3OXYklK/fbY0HEF4nfNPDJOtF9AXzYxNJbUtwhc6XsQOm+j3xGPaunCdq2EqeIBy06LC qEtRyEk2kzTpU+BrXbc8KgwfUxtmjrQAxu/cbMhR/Q3uAqwm23Dg9vhqQuYwfh2SrUXpOz WNI0XTnarcBFSpBnDu8nAIJnsesh0JaPnakB6kaAWC6qXi2Se/7KnuXUzmcBWucYUYiFL/ e+6e1t8UpdeD8RLkHMEPO10B6jCjl3vLVdoLFHsNjt0MplWHnq1SwAMGbmY6fBTRVKb8/p 3ToSzRRvYxtpr7tSDC8aRF/55Y9O9jZrYhn8viRmPSC327XXQq/qgVbt+puu3g== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 3ecfd81b (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Fri, 9 May 2025 06:03:23 +0000 (UTC) Date: Fri, 9 May 2025 08:02:26 +0200 Message-ID: <06dd6b3f55cfdf7fb7610618d1071058b7db0b2a.1746769714.git.herman@rimm.ee> X-Mailer: git-send-email 2.47.1 In-Reply-To: References: MIME-Version: 1.0 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: , Reply-to: Herman Rimm X-ACL-Warn: , Herman Rimm via Guix-patches X-Patchwork-Original-From: Herman Rimm via Guix-patches via From: Herman Rimm Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: Felix Lechner Both refer to data sets returned from the remote expression, and one of them shadowed an element of itself. * gnu/machine/ssh.scm (machine-boot-parameters): Rename generations to remote-results. Change-Id: Ibd8a3036126d9da1215cfc191884c0f54df637df --- gnu/machine/ssh.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gnu/machine/ssh.scm b/gnu/machine/ssh.scm index 696b349a303..47f379c57e3 100644 --- a/gnu/machine/ssh.scm +++ b/gnu/machine/ssh.scm @@ -456,10 +456,11 @@ (define (machine-boot-parameters machine) (read-file boot-parameters-path)))) (reverse (generation-numbers %system-profile))))))) - (mlet* %store-monad ((generations (machine-remote-eval machine remote-exp))) + (mlet %store-monad + ((remote-results (machine-remote-eval machine remote-exp))) (return - (map (lambda (generation) - (match generation + (map (lambda (remote-result) + (match remote-result ((generation system-path time serialized-params) (let* ((params (call-with-input-string serialized-params read-boot-parameters)) @@ -478,7 +479,7 @@ (define (machine-boot-parameters machine) (kernel-arguments (append (bootable-kernel-arguments system-path root version) (boot-parameters-kernel-arguments params)))))))) - generations)))) + remote-results)))) (define-syntax-rule (with-roll-back should-roll-back? mbody ...) "Catch exceptions that arise when binding MBODY, a monadic expression in