From unknown Mon Jun 16 19:27:13 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#68912 <68912@debbugs.gnu.org> To: bug#68912 <68912@debbugs.gnu.org> Subject: Status: Guix-home search paths shadow .config/guix/current Reply-To: bug#68912 <68912@debbugs.gnu.org> Date: Tue, 17 Jun 2025 02:27:13 +0000 retitle 68912 Guix-home search paths shadow .config/guix/current reassign 68912 guix submitter 68912 Christina O'Donnell severity 68912 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 03 12:57:37 2024 Received: (at submit) by debbugs.gnu.org; 3 Feb 2024 17:57:37 +0000 Received: from localhost ([127.0.0.1]:47026 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rWKGm-0001Ml-9w for submit@debbugs.gnu.org; Sat, 03 Feb 2024 12:57:37 -0500 Received: from lists.gnu.org ([2001:470:142::17]:43690) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rWFp5-00052r-Kb for submit@debbugs.gnu.org; Sat, 03 Feb 2024 08:12:44 -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 1rWFoo-0007M7-EQ for bug-guix@gnu.org; Sat, 03 Feb 2024 08:12:26 -0500 Received: from vmi993448.contaboserver.net ([194.163.141.236] helo=mutix.org) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rWFom-0004bD-Dj for bug-guix@gnu.org; Sat, 03 Feb 2024 08:12:26 -0500 Received: from [192.168.1.172] (host86-132-246-87.range86-132.btcentralplus.com [86.132.246.87]) (Authenticated sender: cdo) by mutix.org (Postfix) with ESMTPSA id EE6C8A63622 for ; Sat, 3 Feb 2024 14:12:15 +0100 (CET) Message-ID: <7cd7e463-dfe5-4810-dc17-d1175e4696c3@mutix.org> Date: Sat, 3 Feb 2024 13:12:14 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Content-Language: en-US To: bug-guix@gnu.org From: Christina O'Donnell Subject: Guix-home search paths shadow .config/guix/current Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=194.163.141.236; envelope-from=cdo@mutix.org; helo=mutix.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 03 Feb 2024 12:57:35 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hi, On my machine the order of search paths are: $ echo $PATH | tr : '\n' /home/cdo/.guix-home/profile/bin /home/cdo/.guix-home/profile/sbin /run/setuid-programs /home/cdo/.config/guix/current/bin /home/cdo/.guix-profile/bin /run/current-system/profile/bin /run/current-system/profile/sbin /gnu/store/gjsxzcc0gqpz4lpbsrbidlnn5ij1lfm1-gzip-1.12/bin /gnu/store/z81jl0pb4ppkci4im6n856dkhi2ki2d3-coreutils-9.1/bin This leads to unexpected results if you have Guix inside your home package list. (Which you might desire if you wanted to use Guix in a home container.) The Guix you interact with stays stuck on the version that you had when you first `guix home reconfigured` a configuration with guix as a package. Then `guix pull` appears to succeed but `guix describe` is still stuck at the original version. And even a `guix home reconfigure` doesn't update the version because it's using the `guix` from the original `guix home reconfigure`. The way out of this situation is to use `~/.config/guix/current/bin/guix` directly, setting $PATH manually, or simply removing `guix` from your home package list. However, the situation is preventable and undesirable and there's several possible solutions:  1. Reorder the paths by default, keeping ~/.config/guix in front of ~/.guix-home  2. Have `guix home` warn when 'guix' is included as a package  3. Have `guix pull` warn when Guix is shadowed and unable to be updated My preference would be at least 1 and 3. (Incidentally, how did gzip and coreutils get in there? I didn't put it there.) I'm happy to contribute a patch if others agree that it's worth fixing. Excited to contribute more!  - Christina ---------------- Supplementary output: $ guix describe   guix aeb4943     repository URL: https://git.savannah.gnu.org/git/guix.git     branch: master     commit: aeb494322ca9dec4a4d66a7d063239c8536bd538 $ guix pull Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'... Updating channel 'nonguix' from Git repository at 'https://gitlab.com/nonguix/nonguix'... Building from these channels:   guix      https://git.savannah.gnu.org/git/guix.git    9389070   nonguix   https://gitlab.com/nonguix/nonguix    fe2fcf1 Computing Guix derivation for 'x86_64-linux'... \ nothing to be done hint: After setting `PATH', run `hash guix' to make sure your shell refers to `/home/cdo/.config/guix/current/bin/guix'. $ hash guix $ which guix /home/cdo/.guix-home/profile/bin/guix $ guix describe   guix aeb4943     repository URL: https://git.savannah.gnu.org/git/guix.git     branch: master     commit: aeb494322ca9dec4a4d66a7d063239c8536bd538 From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 08 07:39:51 2024 Received: (at 68912) by debbugs.gnu.org; 8 Feb 2024 12:39:51 +0000 Received: from localhost ([127.0.0.1]:59317 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rY3h1-0006J3-1E for submit@debbugs.gnu.org; Thu, 08 Feb 2024 07:39:51 -0500 Received: from mailrelay.tugraz.at ([129.27.2.202]:44321) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rY0Nr-0005TC-R0 for 68912@debbugs.gnu.org; Thu, 08 Feb 2024 04:07:54 -0500 Received: from kagayaki.local (unknown [185.197.47.246]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4TVrjG22nFz3wnR; Thu, 8 Feb 2024 10:07:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1707383250; bh=D85fkTxMn7uvrK9X0xADGFjO08KMbLj7NpLcI60udyQ=; h=Subject:From:To:Date:In-Reply-To:References; b=HvPimQadv9jsvfxbk4NRn/BkGD62PMy0GSSgm/S1+LfQp58cKrLCH/jv0BP+19gvZ 4ULdNy3DjQpx7UcITUgZG6Y/14LEegXNspMW6roY29lQHBEgR5vPCFjmcqMptN3m4T lQDjWBIUUeUd8bVAacP78UcF/IxJBUHRv6rnpEpc= Message-ID: <23c2397e5ac73a5431e16d6fedaf007c5d92f400.camel@student.tugraz.at> Subject: Re: Guix-home search paths shadow .config/guix/current From: Liliana Marie Prikler To: Christina O'Donnell , 68912@debbugs.gnu.org Date: Thu, 08 Feb 2024 10:07:28 +0100 In-Reply-To: <7cd7e463-dfe5-4810-dc17-d1175e4696c3@mutix.org> References: <7cd7e463-dfe5-4810-dc17-d1175e4696c3@mutix.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 MIME-Version: 1.0 X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 68912 X-Mailman-Approved-At: Thu, 08 Feb 2024 07:39:48 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Am Samstag, dem 03.02.2024 um 13:12 +0000 schrieb Christina O'Donnell: > This leads to unexpected results if you have Guix inside your home=20 > package list. (Which you might desire if you wanted to use Guix in a=20 > home container.) The wisdom "One does not simply 'guix install guix'" has been passed around for ages. Same applies to home configurations, which merely mimic that aspect. There are valid reasons for using Guix in temporary shells (or home containers), but also many pathological uses. > [T]he situation is preventable and undesirable and there's several > possible solutions: >=20 > =C2=A0=C2=A01. Reorder the paths by default, keeping ~/.config/guix in fr= ont of > ~/.guix-home As far as I know, this requires changing the order in which files are sourced, and it's not clearly desirable that ~/.config/guix ought to shadow ~/.guix-home or ~/.guix-profile. In particular, whenever you use `guix shell` or similar, you will shadow that anyway. > =C2=A0=C2=A02. Have `guix home` warn when 'guix' is included as a package This might be fine, but what about the home container use-case then?=20 I'm not sure whether having no guix in containers is preferable over having a slightly outdated one =E2=80=93 at the very least, my personal usa= ge of GWL through `guix shell' is enough reason to keep guix visible as a package. > =C2=A0=C2=A03. Have `guix pull` warn when Guix is shadowed and unable to = be > updated This would (at least in a naive version) print a weird warning on fresh setups, where the not yet created local ~/.config/guix is not yet on PATH. As far as I know, this would be doable, though, if you're smart enough about it. > (Incidentally, how did gzip and coreutils get in there? I didn't put > it there.) These might have been added by the home container for reason unbeknownst to me. > hint: After setting `PATH', run `hash guix' to make sure your shell=20 > refers to `/home/cdo/.config/guix/current/bin/guix'. Hint: this is the warning you're looking for. It's phrased as a hint, because people typically only encounter it once during setup. Cheers