From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id GCo5EVrZymUHDgEA62LTzQ:P1 (envelope-from ) for ; Tue, 13 Feb 2024 03:52:14 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id GCo5EVrZymUHDgEA62LTzQ (envelope-from ) for ; Tue, 13 Feb 2024 03:52:14 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=elephly.net header.s=zoho header.b=W+zFoLUU; 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=none; arc=reject ("signature check failed: fail, {[1] = sig:zohomail.com:reject}") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1707792730; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=2uhAX0bavuypogu8bvE39LreOMo4woMpmRES6+kOtNs=; b=Xtym+3mCcCWlKzN5xN2YSujrYsh5Zx8OrlggGTGVG+mKFb9sA1PF0P11PjtNObvBk+m0fM Ws/9LcELThdVuLLh3ExojZZHsQOyuimZeiIFXFJmECtcGYJFdPREI8gNMXzA7R3sXfu7TH ftT+IPtMszCHR01LBClCGcp1W8YzOyWv3wiqDnq5pQ7LNdH5NBcrxu/+qE0iCLFaoBUIpW 9dKw4EUDTFtvOJRh8ic78FneZuvyVAvzUgj1ucaDdhelYdmtcJAsq2bx+qQ0C4WwZAklHY Wi9xMUxbzDIBrSMcFIeGm3yfc2Nv3Fs9WV/9OXm81l+bEAn9xkUiykGuHhCyVg== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=elephly.net header.s=zoho header.b=W+zFoLUU; 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=none; arc=reject ("signature check failed: fail, {[1] = sig:zohomail.com:reject}") ARC-Seal: i=2; s=key1; d=yhetil.org; t=1707792730; a=rsa-sha256; cv=fail; b=f7id8hlKQtkiWAH2VxAIWVa/2Sj7SetVmtuynzjx123pJQvZLLRiNrgxjiium3TzNy4aNT rTXJyDnUgcVacSdU5l6fZnJjviuJZqoZz8PjDHFIdb5SFO4DdCscY63e35Z1ClofVttV6b lsT693Q+KJztuOCSNIKmxfvpyNpRYQGNHqdJ9UdWuiUf3zVgkc168sGmnJWovK442p/h4s ecam4uEiCS9orQYEIbA71JsxWH3BtbBaaFzDKCXS2t2bV+qkCyhBHLgKWUTmNUEnWVKUi0 eAG2RxuF+1SG/JbvfY2R42bP2g0+V6X0tSRsoevKs1H9c+YEdQVaiItYUlsUqg== 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 6DA81165A7 for ; Tue, 13 Feb 2024 03:52:09 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZith-0006QH-FQ; Mon, 12 Feb 2024 21:51:49 -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 1rZitd-0006Ol-Vj for guix-patches@gnu.org; Mon, 12 Feb 2024 21:51:46 -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 1rZitd-0004cu-NN for guix-patches@gnu.org; Mon, 12 Feb 2024 21:51:45 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rZitu-0004zS-R6 for guix-patches@gnu.org; Mon, 12 Feb 2024 21:52:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#69092] [PATCH] machine/ssh: Invert WITH-ROLL-BACK and MBEGIN. Resent-From: Ricardo Wurmus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 13 Feb 2024 02:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 69092 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69092@debbugs.gnu.org Cc: Ricardo Wurmus X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.170779267618972 (code B ref -1); Tue, 13 Feb 2024 02:52:02 +0000 Received: (at submit) by debbugs.gnu.org; 13 Feb 2024 02:51:16 +0000 Received: from localhost ([127.0.0.1]:38579 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZit9-0004vr-OS for submit@debbugs.gnu.org; Mon, 12 Feb 2024 21:51:16 -0500 Received: from lists.gnu.org ([209.51.188.17]:39802) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZiX3-0003rl-GG for submit@debbugs.gnu.org; Mon, 12 Feb 2024 21:28:26 -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 1rZf8n-0007t3-TX for guix-patches@gnu.org; Mon, 12 Feb 2024 17:51:09 -0500 Received: from sender4-of-o50.zoho.com ([136.143.188.50]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rZf8k-00067L-Rx for guix-patches@gnu.org; Mon, 12 Feb 2024 17:51:09 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1707778261; cv=none; d=zohomail.com; s=zohoarc; b=HUArrk2E5TcbokHKD1sB7Q/DxGZNu9REUwDgqf9Ye8GWcdEj+//c+BRfZ13X944qkBRsRJzayYiDisPgwSKmsQ5TEWxxhDV8Fffp9z1JzDeynWScaHpzsVg51xb+3uKzf4krilLPlo/mN+lQbE8mRejHsmPETz5litLG50Mdb8w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707778261; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=2uhAX0bavuypogu8bvE39LreOMo4woMpmRES6+kOtNs=; b=gzE7anS4H94c74uKdJXdlRrjqCKQ1/vSda5kbMA1MmxsDkQ6/OK0xuxhRKybRqFCEpXhUQbX4yrRUjAOMCLRgRVBYc+FJyayqMmNYGW+9Ej+A0uXyE7FfWqMH0NVF1RroYhDtgfCQwVj/mfqgc/QKxBgO4iFSdW7rySOBLKquQY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1707778261; s=zoho; d=elephly.net; i=rekado@elephly.net; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=2uhAX0bavuypogu8bvE39LreOMo4woMpmRES6+kOtNs=; b=W+zFoLUUbihOrqUVfvfW34scmbtO567nObZZf/euUzmdJylm1wR+yQi0vbS6/nhP x7Bfsv0C52KpISpnoScsOIcgDjwsYmbhBUOYONTck1kTNjLKI7boVXvXScZFI5BUr80 OnK7EgrG2lW8lRtvcyGYOWPGt0BOkWSGBSWsZtyU= Received: from localhost (36-109-142-46.pool.kielnet.net [46.142.109.36]) by mx.zohomail.com with SMTPS id 1707778260463428.42568756250273; Mon, 12 Feb 2024 14:51:00 -0800 (PST) From: Ricardo Wurmus Date: Mon, 12 Feb 2024 23:50:39 +0100 Message-ID: <9915f5dc0cea842a9c4c3f3a13f2c97e6ee60432.1707778239.git.rekado@elephly.net> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.188.50; envelope-from=rekado@elephly.net; helo=sender4-of-o50.zoho.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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-Migadu-Spam-Score: 1.33 X-Migadu-Scanner: mx13.migadu.com X-Spam-Score: 1.33 X-Migadu-Queue-Id: 6DA81165A7 X-TUID: /SXnOmMN13Z6 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 ;;; Copyright © 2020-2023 Ludovic Courtès +;;; Copyright © 2024 Ricardo ;;; ;;; 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