From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id OK5ZHzOHfWZy5gAAe85BDQ:P1 (envelope-from ) for ; Thu, 27 Jun 2024 15:37:23 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id OK5ZHzOHfWZy5gAAe85BDQ (envelope-from ) for ; Thu, 27 Jun 2024 17:37:23 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; 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=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1719502643; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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; bh=lKsFS9WW5u5Q4Cfn6+V2eJPb7nvrsySom49gHDxF7kw=; b=pnz5ANzzcUmiU+y7WEkRGiFcGehVZpz6QKLfq4O+NveEm8oonKATFQpHxcbq0HjdyE3ts+ aktWj+Rkbln1j+MSClvUi3KaxOLTldze1moVdpL/i9LZ/nygjRyAh1wJz5c4hs4cTN4YOd gi3QWw6aNL4e1b/gIahwKUifXsRt7yIRf+tuGjOvH5F6Sf9Jx5Fo0or1Q9GXz8iDnAmJq2 GBwdSZ7F4JyhUDegXi8gDoR9zsjWvy63JRTgAifR4yx7jacEw5lpkarSDKmV1GQOXAv36W 14zq192KjkKkzqEaewpVJKJ1d6HEkj1xnHw9EqUaWmVwwCRUEDsAcDLVIqEhCQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1719502643; a=rsa-sha256; cv=none; b=VxvvS3YpjfZUXCCPDGfdc8W2NV78Imtcn2F3JglQBCZKUx5ZvRto8URSAO+DKeH+QwRcS3 keabld9A9RbBbHIHngEsaMfrDo11DNtpv2859YFD1Upjo3wllvaUaGNc4uREgv1BN4vXlU KilRh9oPzIaWAWaXxYwnVfCZTfhKyEWo8v9UqV3nHODY0GDrbb08AxZq+8JPKebnP+I2xm Lu7fYvE65GTNCxD772bgsvwuw1LtXMWXUd9o0t7YNC8Ypgxh2/LF2m7arIObS1fnU0FLzz JT7N9E+enKm2fFsTD6yRb+h/JDOISX1LVT4xOZbGOOPOw0i3mTj8TXb4ClTG9g== 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 28D2C23398 for ; Thu, 27 Jun 2024 17:37:23 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMrBL-0001hp-Ew; Thu, 27 Jun 2024 11:37:07 -0400 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 1sMrBE-0001gQ-Lx for guix-patches@gnu.org; Thu, 27 Jun 2024 11:37:01 -0400 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 1sMrBE-0005Zz-E6 for guix-patches@gnu.org; Thu, 27 Jun 2024 11:37:00 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sMrBG-00028b-TK for guix-patches@gnu.org; Thu, 27 Jun 2024 11:37:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71802] [PATCH] guix: home: Avoid home reconfiguration when nothing is to be done. References: <20240627150643.30981-1-ngraves@ngraves.fr> In-Reply-To: <20240627150643.30981-1-ngraves@ngraves.fr> Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 27 Jun 2024 15:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71802 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 71802@debbugs.gnu.org Cc: ngraves@ngraves.fr, andrew@trop.in Received: via spool by 71802-submit@debbugs.gnu.org id=B71802.17195026148187 (code B ref 71802); Thu, 27 Jun 2024 15:37:02 +0000 Received: (at 71802) by debbugs.gnu.org; 27 Jun 2024 15:36:54 +0000 Received: from localhost ([127.0.0.1]:43187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMrB8-00027z-4c for submit@debbugs.gnu.org; Thu, 27 Jun 2024 11:36:54 -0400 Received: from 6.mo582.mail-out.ovh.net ([87.98.177.69]:52259) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMrB4-00027o-J8 for 71802@debbugs.gnu.org; Thu, 27 Jun 2024 11:36:52 -0400 Received: from director11.ghost.mail-out.ovh.net (unknown [10.108.25.152]) by mo582.mail-out.ovh.net (Postfix) with ESMTP id 4W92jm50p7z1Bws for <71802@debbugs.gnu.org>; Thu, 27 Jun 2024 15:36:44 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-j6b4p (unknown [10.111.182.7]) by director11.ghost.mail-out.ovh.net (Postfix) with ESMTPS id CFCBF1FEA7; Thu, 27 Jun 2024 15:36:42 +0000 (UTC) Received: from ngraves.fr ([37.59.142.102]) by ghost-submission-6684bf9d7b-j6b4p with ESMTPSA id Zof9NgqHfWam1QMAMsdf5g (envelope-from ); Thu, 27 Jun 2024 15:36:42 +0000 X-OVh-ClientIp: 81.67.146.208 Date: Thu, 27 Jun 2024 17:36:18 +0200 Message-ID: <20240627153634.5181-1-ngraves@ngraves.fr> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 9731152895955296859 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeeftddrtdeggdeludcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecunecujfgurhephffvvefufffkofgggfestdekredtredttdenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpeekffegteffgfffjeegjedvfffgtddvueeutefgfeeuvdejgedvgeejjeevueeuveenucfkphepuddvjedrtddrtddruddpkedurdeijedrudegiedrvddtkedpfeejrdehledrudegvddruddtvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedupdhrtghpthhtohepjedukedtvdesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheekvddpmhhouggvpehsmhhtphhouhht 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: , Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches From: Nicolas Graves via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -6.37 X-Migadu-Queue-Id: 28D2C23398 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -6.37 X-TUID: wJcqU0j3UcQ9 * guix/scripts/home.scm (perform-action): In case of 'reconfigure action, when the output profile is the current profile, avoid reconfiguration. Change-Id: I9d4413df05455a1ebbe10773a851a61e1c8c9e66 --- guix/scripts/home.scm | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/guix/scripts/home.scm b/guix/scripts/home.scm index b4c82d275f1..f0b8251c435 100644 --- a/guix/scripts/home.scm +++ b/guix/scripts/home.scm @@ -446,12 +446,16 @@ (define println (generation (generation-file-name %guix-home (+ 1 number)))) - (switch-symlinks generation he-out-path) - (switch-symlinks %guix-home generation) - (setenv "GUIX_NEW_HOME" he-out-path) - (primitive-load (string-append he-out-path "/activate")) - (setenv "GUIX_NEW_HOME" #f) - (return he-out-path))) + (if (equal? he-out-path (readlink* %guix-home)) + (begin (info (G_ "Nothing to be done.~%")) + (return #f)) + (begin + (switch-symlinks generation he-out-path) + (switch-symlinks %guix-home generation) + (setenv "GUIX_NEW_HOME" he-out-path) + (primitive-load (string-append he-out-path "/activate")) + (setenv "GUIX_NEW_HOME" #f) + (return he-out-path))))) ((container) (mlet %store-monad ((status (spawn-home-container he -- 2.45.2