* [bug#69092] [PATCH] machine/ssh: Invert WITH-ROLL-BACK and MBEGIN.
@ 2024-02-12 22:50 Ricardo Wurmus
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
0 siblings, 2 replies; 3+ messages in thread
From: Ricardo Wurmus @ 2024-02-12 22:50 UTC (permalink / raw)
To: 69092; +Cc: Ricardo Wurmus
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [bug#69092] [PATCH v2] machine/ssh: Refresh parameterization of %CURRENT-SYSTEM.
2024-02-12 22:50 [bug#69092] [PATCH] machine/ssh: Invert WITH-ROLL-BACK and MBEGIN Ricardo Wurmus
@ 2024-02-13 10:50 ` Ricardo Wurmus
2024-02-20 13:48 ` bug#69092: [PATCH] machine/ssh: Invert WITH-ROLL-BACK and MBEGIN Ricardo Wurmus
1 sibling, 0 replies; 3+ messages in thread
From: Ricardo Wurmus @ 2024-02-13 10:50 UTC (permalink / raw)
To: 69092; +Cc: Ricardo Wurmus
The inversion actually didn't help. For some reason, the effect of
PARAMETERIZE is lost. With the patch below I can deploy to the
i686-linux laptop from my x86_64-linux machine again.
From 0a37481608e4ec02c96ef9b54a417bade55528da Mon Sep 17 00:00:00 2001
Message-ID: <0a37481608e4ec02c96ef9b54a417bade55528da.1707821400.git.rekado@elephly.net>
From: Ricardo Wurmus <rekado@elephly.net>
Date: Mon, 12 Feb 2024 23:45:54 +0100
Subject: [PATCH v2] machine/ssh: Refresh parameterization of %CURRENT-SYSTEM.
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.
* 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 | 31 +++++++++++++++++--------------
1 file changed, 17 insertions(+), 14 deletions(-)
diff --git a/gnu/machine/ssh.scm b/gnu/machine/ssh.scm
index b5984dc732..b47ce7c225 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,22 +538,24 @@ (define (deploy-managed-host machine)
host
(inferior-exception-arguments c))))
os))
- (with-roll-back #t
- (mbegin %store-monad
- (upgrade-shepherd-services (eval/error-handling c
- (warning (G_ "\
+ (parameterize ((%current-system system)
+ (%current-target-system #f))
+ (with-roll-back #t
+ (mbegin %store-monad
+ (upgrade-shepherd-services (eval/error-handling c
+ (warning (G_ "\
an error occurred while upgrading services on '~a':~%~{~s ~}~%")
- host
- (inferior-exception-arguments
- c)))
- os)
- (install-bootloader (eval/error-handling c
- (raise (formatted-message
- (G_ "\
+ host
+ (inferior-exception-arguments
+ c)))
+ os)
+ (install-bootloader (eval/error-handling c
+ (raise (formatted-message
+ (G_ "\
failed to install bootloader on '~a':~%~{~s ~}~%")
- host
- (inferior-exception-arguments c))))
- bootloader-configuration bootcfg))))))))
+ host
+ (inferior-exception-arguments c))))
+ bootloader-configuration bootcfg)))))))))
\f
;;;
base-commit: bb4f0509b7cce750fc944e604aa919ea89910ea7
prerequisite-patch-id: 94eb24b4353a5dec691918e2258cab6f0873fd98
prerequisite-patch-id: d9e728fe0e2597792f468fea405c04845b31bc75
prerequisite-patch-id: a4c47cb27daff30f775243af50a8ae9d8af0300e
prerequisite-patch-id: 7258bad0bbb2065c66be06c685d6dd237d8d0670
prerequisite-patch-id: 2bc8562f64bd31a92045dabeb0e9749eadb1b562
prerequisite-patch-id: fadcf73ca0278af9f58f5bd2ddb6b1ad1b223dc3
prerequisite-patch-id: d1f94c163297151b41e6febed26f5833cd1b2ea8
prerequisite-patch-id: 9a9328cc3a35f5a8903f43e164749a62d48d697e
prerequisite-patch-id: f1e33c0ea08b372c33edbcacc750c74897e0b5ab
--
2.41.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* bug#69092: [PATCH] machine/ssh: Invert WITH-ROLL-BACK and MBEGIN.
2024-02-12 22:50 [bug#69092] [PATCH] machine/ssh: Invert WITH-ROLL-BACK and MBEGIN Ricardo Wurmus
2024-02-13 10:50 ` [bug#69092] [PATCH v2] machine/ssh: Refresh parameterization of %CURRENT-SYSTEM Ricardo Wurmus
@ 2024-02-20 13:48 ` Ricardo Wurmus
1 sibling, 0 replies; 3+ messages in thread
From: Ricardo Wurmus @ 2024-02-20 13:48 UTC (permalink / raw)
To: 69092-done
I’ve pushed the v2 of this patch to work around this problem for now,
but it is not a satisfying conclusion.
--
Ricardo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-02-20 13:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-12 22:50 [bug#69092] [PATCH] machine/ssh: Invert WITH-ROLL-BACK and MBEGIN Ricardo Wurmus
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
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).