From: Herman Rimm via Guix-patches via <guix-patches@gnu.org>
To: 75010@debbugs.gnu.org
Cc: Felix Lechner <felix.lechner@lease-up.com>
Subject: [bug#75010] [PATCH 4/7] Rename two remote variables confusingly named 'generations'.
Date: Sat, 21 Dec 2024 18:04:08 +0100 [thread overview]
Message-ID: <9ae59065234a1d8215f94f2df13752cbfa438595.1734798943.git.herman@rimm.ee> (raw)
In-Reply-To: <cover.1734798943.git.herman@rimm.ee>
From: Felix Lechner <felix.lechner@lease-up.com>
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 c76b51c757..3e69d4b9a3 100644
--- a/gnu/machine/ssh.scm
+++ b/gnu/machine/ssh.scm
@@ -455,10 +455,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))
@@ -477,7 +478,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
--
2.45.2
next prev parent reply other threads:[~2024-12-21 17:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1734798943.git.herman@rimm.ee>
2024-12-21 17:04 ` [bug#75010] [PATCH 1/7] monads: Add 'mmatch' Herman Rimm via Guix-patches via
2024-12-21 17:04 ` [bug#75010] [PATCH 2/7] gnu: machine: ssh: Refactor roll-back-managed-host Herman Rimm via Guix-patches via
2024-12-21 17:04 ` [bug#75010] [PATCH 3/7] gnu: machine: ssh: Return monadic value from roll-back-managed-host Herman Rimm via Guix-patches via
2024-12-21 17:04 ` Herman Rimm via Guix-patches via [this message]
2024-12-21 17:04 ` [bug#75010] [PATCH 5/7] gnu: machine: Remove &deploy-error Herman Rimm via Guix-patches via
2024-12-21 17:04 ` [bug#75010] [PATCH 6/7] gnu: machine: ssh: Roll-back on failure Herman Rimm via Guix-patches via
2024-12-21 17:04 ` [bug#75010] [PATCH 7/7] WIP: gnu: tests: Add module for guix deploy tests Herman Rimm via Guix-patches via
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=9ae59065234a1d8215f94f2df13752cbfa438595.1734798943.git.herman@rimm.ee \
--to=guix-patches@gnu.org \
--cc=75010@debbugs.gnu.org \
--cc=felix.lechner@lease-up.com \
--cc=herman@rimm.ee \
/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.