From unknown Tue Jun 17 01:32:14 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#45600 <45600@debbugs.gnu.org> To: bug#45600 <45600@debbugs.gnu.org> Subject: Status: [PATCH] /etc/profile.d/guix.sh: Add guix pull profile even when absent Reply-To: bug#45600 <45600@debbugs.gnu.org> Date: Tue, 17 Jun 2025 08:32:14 +0000 retitle 45600 [PATCH] /etc/profile.d/guix.sh: Add guix pull profile even wh= en absent reassign 45600 guix-patches submitter 45600 Jakub K=C4=85dzio=C5=82ka severity 45600 normal tag 45600 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 01 12:54:03 2021 Received: (at submit) by debbugs.gnu.org; 1 Jan 2021 17:54:03 +0000 Received: from localhost ([127.0.0.1]:34762 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kvOcl-0000YN-Ad for submit@debbugs.gnu.org; Fri, 01 Jan 2021 12:54:03 -0500 Received: from lists.gnu.org ([209.51.188.17]:52734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kvOcj-0000Y5-MU for submit@debbugs.gnu.org; Fri, 01 Jan 2021 12:54:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53454) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kvOcj-0002dJ-Bn for guix-patches@gnu.org; Fri, 01 Jan 2021 12:54:01 -0500 Received: from pat.zlotemysli.pl ([37.59.186.212]:34294) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kvOcg-0002SF-So for guix-patches@gnu.org; Fri, 01 Jan 2021 12:54:01 -0500 Received: (qmail 6806 invoked by uid 1009); 1 Jan 2021 18:53:50 +0100 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/26034. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.036498 secs); 01 Jan 2021 17:53:50 -0000 Received: from unknown (HELO localhost.localdomain) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with AES256-SHA encrypted SMTP; 1 Jan 2021 18:53:50 +0100 From: =?UTF-8?q?Jakub=20K=C4=85dzio=C5=82ka?= To: guix-patches@gnu.org Subject: [PATCH] /etc/profile.d/guix.sh: Add guix pull profile even when absent Date: Fri, 1 Jan 2021 18:53:47 +0100 Message-Id: <20210101175347.1736-1-kuba@kadziolka.net> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Qmailux-2.08st: added fake Content-Type header Content-Type: text/plain Received-SPF: none client-ip=37.59.186.212; envelope-from=kuba@kadziolka.net; helo=pat.zlotemysli.pl 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_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit 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 (---) After initial installation on a foreign distro, the guix pull profile won't be present in path. This means that the first guix pull won't take effect until the shell is restarted. ~/.guix-profile cannot be pre-loaded like this as the relevant paths are stored in ~/.guix-profile/etc/profile, which simply won't exist. However, guix package will output a relevant hint that instructs the user to reload the profile, so this isn't a problem. --- Note on testing: I have verified that non-existent directories are harmless when included in $PATH and $INFOPATH. However, fully testing this change requires setting up a virtual machine and installing Guix on it, which I cannot do right now. etc/guix-install.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/etc/guix-install.sh b/etc/guix-install.sh index 9015f40bb6..69b8b88847 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -454,14 +454,12 @@ sys_create_init_profile() cat <<"EOF" > /etc/profile.d/guix.sh # _GUIX_PROFILE: `guix pull` profile _GUIX_PROFILE="$HOME/.config/guix/current" -if [ -L $_GUIX_PROFILE ]; then - export PATH="$_GUIX_PROFILE/bin${PATH:+:}$PATH" - # Export INFOPATH so that the updated info pages can be found - # and read by both /usr/bin/info and/or $GUIX_PROFILE/bin/info - # When INFOPATH is unset, add a trailing colon so that Emacs - # searches 'Info-default-directory-list'. - export INFOPATH="$_GUIX_PROFILE/share/info:$INFOPATH" -fi +export PATH="$_GUIX_PROFILE/bin${PATH:+:}$PATH" +# Export INFOPATH so that the updated info pages can be found +# and read by both /usr/bin/info and/or $GUIX_PROFILE/bin/info +# When INFOPATH is unset, add a trailing colon so that Emacs +# searches 'Info-default-directory-list'. +export INFOPATH="$_GUIX_PROFILE/share/info:$INFOPATH" # GUIX_PROFILE: User's default profile GUIX_PROFILE="$HOME/.guix-profile" -- 2.29.2 From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 03 09:53:57 2021 Received: (at 45600) by debbugs.gnu.org; 3 Jan 2021 14:53:57 +0000 Received: from localhost ([127.0.0.1]:37315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kw4lY-0003PY-WC for submit@debbugs.gnu.org; Sun, 03 Jan 2021 09:53:57 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57812) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kw4lX-0003PM-0K for 45600@debbugs.gnu.org; Sun, 03 Jan 2021 09:53:55 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43277) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kw4lR-0004mw-3T; Sun, 03 Jan 2021 09:53:49 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=33250 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kw4lQ-0003ic-K3; Sun, 03 Jan 2021 09:53:48 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Jakub =?utf-8?B?S8SFZHppb8WCa2E=?= Subject: Re: [bug#45600] [PATCH] /etc/profile.d/guix.sh: Add guix pull profile even when absent References: <20210101175347.1736-1-kuba@kadziolka.net> Date: Sun, 03 Jan 2021 15:53:46 +0100 In-Reply-To: <20210101175347.1736-1-kuba@kadziolka.net> ("Jakub =?utf-8?B?S8SFZHppb8WCa2EiJ3M=?= message of "Fri, 1 Jan 2021 18:53:47 +0100") Message-ID: <878s9a2hs5.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 45600 Cc: 45600@debbugs.gnu.org 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 (---) Hi, Jakub K=C4=85dzio=C5=82ka skribis: > After initial installation on a foreign distro, the guix pull profile > won't be present in path. This means that the first guix pull won't take > effect until the shell is restarted. > > ~/.guix-profile cannot be pre-loaded like this as the relevant paths are > stored in ~/.guix-profile/etc/profile, which simply won't exist. > However, guix package will output a relevant hint that instructs the > user to reload the profile, so this isn't a problem. LGTM! Please add something like this to the commit log: * etc/guix-install.sh (sys_create_init_profile): Set PATH and INFOPATH even when $_GUIX_PROFILE does not exist. Thank you, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 03 10:07:17 2021 Received: (at 45600) by debbugs.gnu.org; 3 Jan 2021 15:07:17 +0000 Received: from localhost ([127.0.0.1]:38322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kw4yT-0003yi-Bq for submit@debbugs.gnu.org; Sun, 03 Jan 2021 10:07:17 -0500 Received: from pat.zlotemysli.pl ([37.59.186.212]:58044) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kw4yP-0003yK-6y for 45600@debbugs.gnu.org; Sun, 03 Jan 2021 10:07:14 -0500 Received: (qmail 3892 invoked by uid 1009); 3 Jan 2021 16:07:11 +0100 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/26036. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.036844 secs); 03 Jan 2021 15:07:11 -0000 Received: from unknown (HELO localhost) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with SMTP; 3 Jan 2021 16:07:11 +0100 Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 From: =?utf-8?q?Jakub_K=C4=85dzio=C5=82ka?= To: =?utf-8?q?Ludovic_Court=C3=A8s?= Subject: Re: [bug#45600] [PATCH] /etc/profile.d/guix.sh: Add guix pull profile even when absent Date: Sun, 03 Jan 2021 16:06:37 +0100 Message-Id: In-Reply-To: <878s9a2hs5.fsf@gnu.org> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 45600 Cc: 45600@debbugs.gnu.org, 45600-done@debbugs.gnu.org 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: -1.0 (-) On Sun Jan 3, 2021 at 3:53 PM CET, Ludovic Court=C3=A8s wrote: > Hi, > > Jakub K=C4=85dzio=C5=82ka skribis: > > > After initial installation on a foreign distro, the guix pull profile > > won't be present in path. This means that the first guix pull won't tak= e > > effect until the shell is restarted. > > > > ~/.guix-profile cannot be pre-loaded like this as the relevant paths ar= e > > stored in ~/.guix-profile/etc/profile, which simply won't exist. > > However, guix package will output a relevant hint that instructs the > > user to reload the profile, so this isn't a problem. > > LGTM! > > Please add something like this to the commit log: > > * etc/guix-install.sh (sys_create_init_profile): Set PATH and INFOPATH > even when $_GUIX_PROFILE does not exist. Thanks, forgot about that... Commit pushed. Regards, Jakub K=C4=85dzio=C5=82ka From unknown Tue Jun 17 01:32:14 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 01 Feb 2021 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator