[PATCH] guix-install.sh: Fix sys_create_init_profile.

  • Open
  • quality assurance status badge
Details
One participant
  • typ22
Owner
unassigned
Submitted by
typ22
Severity
normal
T
(address . guix-patches@gnu.org)(name . tiantian)(address . typ22@foxmail.com)
tencent_C60863DE02D180AE86E30159A8857129DE05@qq.com
From: tiantian <typ22@foxmail.com>

* etc/guix-install.sh (sys_create_init_profile): Remove the redundant colons
in GUIX_LOCPATH and change '||' to '&&'.
---
etc/guix-install.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

Toggle diff (44 lines)
diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 982fb0a266..4715733245 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -547,13 +547,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

base-commit: d20ece07dbb09382f361c8bbf0bcab9e83d8b73e
--
2.43.0

Hi guix,

After source /etc/profile, I got
"GUIX_LOCPATH=/home/tt/.guix-home/profile/lib/locale:".

Firstly, it has an extra colon at the end. I checked '/etc/zzz-guix.sh'
and found an extra colon in GUIX_LOCPATH.

Then, I didn't have '.guix-home'. This is an error.
I checked '/etc/zzz-guix.sh' again and found that '||' was used incorrectly.
The second command will not be executed when '$HOME/.guix-home/profile' exists
and is a symbolic link; otherwise, execute the second command.

My English is not good. If there are grammar and tone errors, please forgive me.

Thanks,
tiantian
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 67427@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 67427
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch