GNU bug report logs - #69092
[PATCH] machine/ssh: Invert WITH-ROLL-BACK and MBEGIN.

Previous Next

Package: guix-patches;

Reported by: Ricardo Wurmus <rekado <at> elephly.net>

Date: Tue, 13 Feb 2024 02:52:02 UTC

Severity: normal

Tags: patch

Done: Ricardo Wurmus <rekado <at> elephly.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ricardo Wurmus <rekado <at> elephly.net>
Subject: bug#69092: closed ([PATCH] machine/ssh: Invert WITH-ROLL-BACK and
 MBEGIN.)
Date: Tue, 20 Feb 2024 13:51:01 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#69092: [PATCH] machine/ssh: Invert WITH-ROLL-BACK and MBEGIN.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 69092 <at> debbugs.gnu.org.

-- 
69092: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69092
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Ricardo Wurmus <rekado <at> elephly.net>
To: 69092-done <at> debbugs.gnu.org
Subject: [PATCH] machine/ssh: Invert WITH-ROLL-BACK and MBEGIN.
Date: Tue, 20 Feb 2024 14:48:55 +0100
I’ve pushed the v2 of this patch to work around this problem for now,
but it is not a satisfying conclusion.

-- 
Ricardo

[Message part 3 (message/rfc822, inline)]
From: Ricardo Wurmus <rekado <at> elephly.net>
To: guix-patches <at> gnu.org
Cc: Ricardo Wurmus <rekado <at> elephly.net>
Subject: [PATCH] machine/ssh: Invert WITH-ROLL-BACK and MBEGIN.
Date: Mon, 12 Feb 2024 23:50:39 +0100
When using "guix deploy" on an x86_64-linux machine to deploy a system to
i686-linux, DEPLOY-MANAGED-HOST would revert %CURRENT-SYSTEM to the host
system's value by the time it evaluated UPGRADE-SHEPHERD-SERVICES.  The
earlier PARAMETERIZE would no longer be effective.

Turning the expression inside out solves the problem as the monadic expression
introduced with MBEGIN retains the %CURRENT-SYSTEM parameter.

* gnu/machine/ssh.scm (deploy-managed-host): Ensure that
UPGRADE-SHEPHERD-SERVICES is evaluated for the architecture of the target
machine.

Change-Id: I0816da79cd7c46a69418717fa33b2fe4e2fabae0
---
 gnu/machine/ssh.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gnu/machine/ssh.scm b/gnu/machine/ssh.scm
index b5984dc732..011d197917 100644
--- a/gnu/machine/ssh.scm
+++ b/gnu/machine/ssh.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays <at> sdf.org>
 ;;; Copyright © 2020-2023 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2024 Ricardo <rekado <at> elephly.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -537,8 +538,8 @@ (define (deploy-managed-host machine)
                                         host
                                         (inferior-exception-arguments c))))
                               os))
-          (with-roll-back #t
-            (mbegin %store-monad
+          (mbegin %store-monad
+            (with-roll-back #t
               (upgrade-shepherd-services (eval/error-handling c
                                            (warning (G_ "\
 an error occurred while upgrading services on '~a':~%~{~s ~}~%")

base-commit: bb4f0509b7cce750fc944e604aa919ea89910ea7
-- 
2.41.0




This bug report was last modified 1 year and 88 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.