[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#77525] [PATCH v4 2/6] system: /etc/profile: Rearrange to avoid sear
From: |
宋文武 |
Subject: |
[bug#77525] [PATCH v4 2/6] system: /etc/profile: Rearrange to avoid search path duplication. |
Date: |
Sat, 19 Apr 2025 10:13:52 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Hilton Chain <hako@ultrarare.space> writes:
> * gnu/system.scm (operating-system-etc-service)[profile]: Set umask first.
OK.
> Group environment variables setup with profile sourcing to avoid duplication.
It was already grouped in previous commit, maybe "Setup crucial
variables from all the default profiles."
> Export $GUILE_LOAD_PATH and $GUILE_LOAD_COMPILED_PATH for ‘guix pull’ profile.
Could be a seperated commit, but maybe not needed? Since 'guix repl'
would ensure it.
> * gnu/system/shadow.scm (%default-bash-profile): Remove duplicated exports.
I think this better go into a seperated commit, and with comment or
cookbook doc for the merge search paths from multiple profiles usage.
> [...]
> do
> - if [ -f \"$GUIX_PROFILE/etc/profile\" ]
> - then
> + if [ -f \"$GUIX_PROFILE/etc/profile\" ]; then
> . \"$GUIX_PROFILE/etc/profile\"
> - else
> - # At least define this one so that basic things just work
> - # when the user installs their first package.
> - export PATH=\"$GUIX_PROFILE/bin:$PATH\"
> + if [ ! \"$GUIX_PROFILE\" = \"$HOME/.config/guix/current\" ]; then
> + # Crucial variables that could be missing in the profiles'
> 'etc/profile'
> + # because they would require combining both profiles.
> + # FIXME: See <http://bugs.gnu.org/20255>.
> + case $XDG_DATA_DIRS in
> + *$GUIX_PROFILE/share*) ;;
> + *) export
> XDG_DATA_DIRS=\"$GUIX_PROFILE/share${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS\" ;;
> + esac
> + case $XDG_CONFIG_DIRS in
> + *$GUIX_PROFILE/etc/xdg*) ;;
> + *) export
> XDG_CONFIG_DIRS=\"$GUIX_PROFILE/etc/xdg${XDG_CONFIG_DIRS:+:}$XDG_CONFIG_DIRS\"
> ;;
> + esac
> + # Make sure libXcursor finds cursors installed into user or system
> profiles.
> + # See <http://bugs.gnu.org/24445>
Commit 2acfafff set XCURSORPATH contains user and system profiles, but
not home profile as this patch did, this comment about 24445 can be
removed.
Otherwise, look good to me!
[bug#77526] [PATCH v4 3/6] system: /etc/profile: Set up extra environment variables for Guix Home., Hilton Chain, 2025/04/03
[bug#77524] [PATCH v4 4/6] system & home: profile: Address issues reported by ‘shellcheck’., Hilton Chain, 2025/04/03
[bug#77528] [PATCH v4 6/6] guix-install.sh: Set up extra environment variables for Guix Home., Hilton Chain, 2025/04/03