From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 4NhZJGp1fGcneQAAe85BDQ:P1 (envelope-from ) for ; Tue, 07 Jan 2025 00:29:30 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 4NhZJGp1fGcneQAAe85BDQ (envelope-from ) for ; Tue, 07 Jan 2025 01:29:30 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=tsgsR89G; dkim=fail ("headers rsa verify failed") header.d=systemreboot.net header.s=default header.b=XW74GDVf; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=systemreboot.net (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1736209769; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=koPhJjsCT+WcG3YD0Y2UK8kA1x0JuaZMkZWun8KekNg=; b=Cj6BWmFcSGqfSmnUR88zAyZ+l09I9nym7ym+0ls3qsKzyHyWkMUbiF5b+CII6umPsz9EVJ M2EUFa5iWEayfw4jyovax1e7TEZHmTqGb/ldRjD3pFk/g+NvSDRkIy1gojav1A7EarH6Ic EQPakKZanaEWiPfVrloVSIAtPDv71Nczbrh6Fbr1HZbLWOkAB8eEWcp0ZJ4x5Qn8Qsqbft kZY/zlYDumz2lV48G57aOmKHr9a/Z5YJGEnBD5qmHqb6RbxCHypJB/YiBOUTRuZoL9hYRn +7P0Qu1CUYblAJPGTho1sOKfYV2Ebjvi4Jpb4FqJ6iex2EvVuAt4yMa/2/1h0g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=tsgsR89G; dkim=fail ("headers rsa verify failed") header.d=systemreboot.net header.s=default header.b=XW74GDVf; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=systemreboot.net (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1736209769; a=rsa-sha256; cv=none; b=nLhEVg9PcinBxrx9RGfpnud1+r7BWmmC/RhZ8VrYI7z9RmB21GYX2vteqzbib1MMVyZapR Pm/c73pN30QK/OeKgbj4XHZWS1QiXX6EtkZEAX7cgaF4ZSsi/eiEjbiRkAtCND5Q7C8PEL pgo2ic0vacAdwwAb2FYdj4uQK0+ief4Cc+w8555MLZJchI2Vydc9y0nPyVHbmAB6/p5EVZ ShHgKsDPhs5tpl26aqWxtIflnjK3opGcXSLFvKAgvr63Rpk0ys44RkDG+mrFXw8IYXmyaD bUwyq8H/aq56hJSK1y7gvwy8gkky55rBSvki6jXMBJmoBiAeaPUIDjVlzXz1Lg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 869A73424F for ; Tue, 07 Jan 2025 01:29:28 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUxSz-00027j-Ue; Mon, 06 Jan 2025 19:29:06 -0500 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 1tUxSy-00027F-EG for guix-patches@gnu.org; Mon, 06 Jan 2025 19:29:04 -0500 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 1tUxSy-0004rb-5y for guix-patches@gnu.org; Mon, 06 Jan 2025 19:29:04 -0500 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=pn3GUGQcm7v5aTbG/shfs+SKgPfY705W9oGwU9QgkUs=; b=tsgsR89GQS+X5MCfrHZDS/M0Btr99+hRcgL2T99UrUPJR7aoP4Rx3y2fDMvWgRsNw6bUwhawqMyG2pcsPpjLzFPUtWoCPdBTpgeHZuJYJikra5P10oe1wMJuRK4aHM+Sj82Q2LQb21ZYg7jznwR+uo5mFebu2HxIxAMAzKKoAO1Xu7R1nnOjJwNLLjLefj8WMkNOs5v70WfxiX8Br+xbg5iNmJy02Imdblc7ZO9GxCIJfUv1k85uf085k7aTz3JFwUVao/9X2LNeO9/mrhxSxxUYNqnyxg9a1aMCuWXa1XYRwI4FKEtOrwe01mJXOvHiWhBP9NI5YtScPu4tgoOMsA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tUxSw-00041q-NT; Mon, 06 Jan 2025 19:29:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75414] [PATCH 1/2] machine: ssh: Return monadic value from roll-back-managed-host. Resent-From: Arun Isaac Original-Sender: "Debbugs-submit" Resent-CC: arunisaac@systemreboot.net, guix-patches@gnu.org Resent-Date: Tue, 07 Jan 2025 00:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75414 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75414@debbugs.gnu.org Cc: Arun Isaac , Arun Isaac X-Debbugs-Original-Xcc: Arun Isaac Received: via spool by 75414-submit@debbugs.gnu.org id=B75414.173620974115468 (code B ref 75414); Tue, 07 Jan 2025 00:29:02 +0000 Received: (at 75414) by debbugs.gnu.org; 7 Jan 2025 00:29:01 +0000 Received: from localhost ([127.0.0.1]:41042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUxSu-00041M-Qi for submit@debbugs.gnu.org; Mon, 06 Jan 2025 19:29:01 -0500 Received: from mugam.systemreboot.net ([139.59.75.54]:50610) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tUxSr-00040q-9W for 75414@debbugs.gnu.org; Mon, 06 Jan 2025 19:28:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=systemreboot.net; s=default; t=1736209728; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=koPhJjsCT+WcG3YD0Y2UK8kA1x0JuaZMkZWun8KekNg=; b=XW74GDVfyx79iiNfOXtEUdsYaZMYYhZczvSajWZcqV2F0fiVppNLyaWYLPAk21ZIPzOZb5 FqpSscCU0Br48MRtMHzEoZi+RX1Lsziqi+Gj7M533HacCLHWhePwfbCduNRWG/MJIoFvRL 6D2B0TIAV63EIMFHmXNipUKkvJ1+d0JOPQtS4cxZV2dLl6UOYmzMGB4+ZVh8j4COOGJED9 IxJqXg9ExAF+muW68pSd/bjLHomTI4q2e+FvkOUQ12rXdEOVg/4e0ee2wWquhB/i95wzN5 pAyHsFbA0RI1hqykFdY4XXXp5KZWjTIW2h9zor0HlBxnuWQYqD149cjkaBq/og== Received: from localhost.localdomain ( [192.168.2.1]) by mugam.systemreboot.net (OpenSMTPD) with ESMTPSA id 00ab12d9 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 7 Jan 2025 00:28:47 +0000 (UTC) From: Arun Isaac Date: Tue, 7 Jan 2025 00:28:30 +0000 Message-ID: <9d154b115a6a1bb7a7fb0cc24d1bd8c90a1437ab.1736208948.git.arunisaac@systemreboot.net> X-Mailer: git-send-email 2.47.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Spam: Yes X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam: Yes X-Spam-Score: 9.51 X-Migadu-Queue-Id: 869A73424F X-Migadu-Spam-Score: 9.51 X-TUID: UqmoswaqTIEE Previously, would be returned. That was a bug. Monadic procedures must always return monadic values. * gnu/machine/ssh.scm (roll-back-managed-host): Return monadic value. Change-Id: I3db2879dbfbcab5e9d251fa5ed02c8653adbeafb --- gnu/machine/ssh.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gnu/machine/ssh.scm b/gnu/machine/ssh.scm index bc4289ef7d..73d5dc513e 100644 --- a/gnu/machine/ssh.scm +++ b/gnu/machine/ssh.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2019 Jakob L. Kreuze ;;; Copyright © 2020-2024 Ludovic Courtès ;;; Copyright © 2024 Ricardo +;;; Copyright © 2025 Arun Isaac ;;; ;;; This file is part of GNU Guix. ;;; @@ -621,8 +622,9 @@ (define (roll-back-managed-host machine) #:store-directory-prefix store-dir #:old-entries old-entries))) (remote-result (machine-remote-eval machine remote-exp))) - (when (eqv? 'error remote-result) - (raise roll-back-failure)))) + (if (eqv? 'error remote-result) + (raise roll-back-failure) + (return remote-result)))) ;;; -- 2.47.1