diff mbox series

[bug#70218,2/2] guix-install.sh: Fix setting GUIX_LOCPATH.

Message ID 6b147273d133a1dbdcc2141be4fec18ffe1112fa.1712336516.git.~@wolfsden.cz
State New
Headers show
Series Some fixes for guix-install.sh | expand

Commit Message

Tomas Volf April 5, 2024, 5:09 p.m. UTC
After installing Guix home on my new foreign system, the locale did not
work and GDM did not even let me to log in.  After some digging around using
tty3 and tty4, I realized the GUIX_LOCPATH is not being set properly.

I had nothing installed in the ~/.guix-profile (the symlink did not even
exist) and I had glibc-locales installed in ~/.guix-home, yet GUIX_LOCPATH
contained "$HOME/.guix-profile/lib/locale:".

I believe when the code was modified from the original "home or profile" to
the current "home and profile" the || was used by accident instead of &&.

I also remove the trailing :, since it is taken care of by the ${...:+:}.

* etc/guix-install.sh (sys_create_init_profile):

Change-Id: I8a3287fe809af58aee2edc924154eecf91fa1eb8
---
 etc/guix-install.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 7876afa196..e7a8ca6476 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -549,13 +549,13 @@  export INFOPATH="$_GUIX_PROFILE/share/info:$INFOPATH"
 # GUIX_PROFILE: User's default profile and home profile
 GUIX_PROFILE="$HOME/.guix-profile"
 [ -f "$GUIX_PROFILE/etc/profile" ] && . "$GUIX_PROFILE/etc/profile"
-[ -L "$GUIX_PROFILE" ] || \
-GUIX_LOCPATH="$GUIX_PROFILE/lib/locale:${GUIX_LOCPATH:+:}$GUIX_LOCPATH"
+[ -L "$GUIX_PROFILE" ] && \
+GUIX_LOCPATH="$GUIX_PROFILE/lib/locale${GUIX_LOCPATH:+:}$GUIX_LOCPATH"
 
 GUIX_PROFILE="$HOME/.guix-home/profile"
 [ -f "$GUIX_PROFILE/etc/profile" ] && . "$GUIX_PROFILE/etc/profile"
-[ -L "$GUIX_PROFILE" ] || \
-GUIX_LOCPATH="$GUIX_PROFILE/lib/locale:${GUIX_LOCPATH:+:}$GUIX_LOCPATH"
+[ -L "$GUIX_PROFILE" ] && \
+GUIX_LOCPATH="$GUIX_PROFILE/lib/locale${GUIX_LOCPATH:+:}$GUIX_LOCPATH"
 
 export GUIX_LOCPATH