all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: 69092@debbugs.gnu.org
Cc: Ricardo Wurmus <rekado@elephly.net>
Subject: [bug#69092] [PATCH] machine/ssh: Invert WITH-ROLL-BACK and MBEGIN.
Date: Mon, 12 Feb 2024 23:50:39 +0100	[thread overview]
Message-ID: <9915f5dc0cea842a9c4c3f3a13f2c97e6ee60432.1707778239.git.rekado@elephly.net> (raw)

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@sdf.org>
 ;;; Copyright © 2020-2023 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2024 Ricardo <rekado@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





             reply	other threads:[~2024-02-13  2:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-12 22:50 Ricardo Wurmus [this message]
2024-02-13 10:50 ` [bug#69092] [PATCH v2] machine/ssh: Refresh parameterization of %CURRENT-SYSTEM Ricardo Wurmus
2024-02-20 13:48 ` bug#69092: [PATCH] machine/ssh: Invert WITH-ROLL-BACK and MBEGIN Ricardo Wurmus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9915f5dc0cea842a9c4c3f3a13f2c97e6ee60432.1707778239.git.rekado@elephly.net \
    --to=rekado@elephly.net \
    --cc=69092@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.