Subject: bug#52891: closed (Re: bug#52891: [PATCH] guix-install.sh: Run guix.sh script in /etc/profile.d last.)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 08 Nov 2022 10:00:02 +0000

Your bug report

#52891: [PATCH] guix-install.sh: Run guix.sh script in /etc/profile.d last.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
52891: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=52891
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#52891: [PATCH] guix-install.sh: Run guix.sh script in /etc/profile.d last.
From: Mathieu Othacehe <[email-masked]>
To: Ludovic Courtès <[email-masked]>
Cc: Konrad Hinsen <[email-masked]>, [email-masked]
Date: Tue, 08 Nov 2022 10:58:54 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

> Does anybody have objections, such as distros where this would not work?
>
> Otherwise let’s apply it in time for the upcoming release.

Tested on Ubuntu, seems to work fine. It appears to be the right thing
to do to make sure that Guix stuff is prepended to XDG_*, PATH and
INFOPATH variables.

Applied as 93be56a3ab28ed0a482f354b7f536681c99b6999.

Thanks,

Mathieu

Subject: [PATCH] guix-install.sh: Run guix.sh script in /etc/profile.d last.
From: Konrad Hinsen <[email-masked]>
To: [email-masked]
Date: Thu, 30 Dec 2021 09:39:31 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

* etc/guix-install.sh: Rename /etc/profile.d/guix.sh to zzz-guix.sh.

This script refers to environment variables set by the host distribution.
They may be set in other scripts in /etc/profile.d, which must therefore
be run first.
Example: in Ubuntu 20.04, XDG_DATA_DIRS is set in
/etc/profile.d/xdg_dirs_desktop_session.sh
---
 etc/guix-install.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index cd1a1c34c1..00a9fc5377 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -503,7 +503,7 @@ sys_create_init_profile()
 { # Define for better desktop integration
   # This will not take effect until the next shell or desktop session!
     [ -d "/etc/profile.d" ] || mkdir /etc/profile.d # Just in case
-    cat <<"EOF" > /etc/profile.d/guix.sh
+    cat <<"EOF" > /etc/profile.d/zzz-guix.sh
 # _GUIX_PROFILE: `guix pull` profile
 _GUIX_PROFILE="$HOME/.config/guix/current"
 export PATH="$_GUIX_PROFILE/bin${PATH:+:}$PATH"
-- 
2.34.0