linux standalone: When LOCPATH is already set, use it instead of the bundled locales.

It can be set to an empty string to use the system locales too. Of course
whether that will work depends on the amount of divergence.

This commit was supported by the NSF-funded DataLad project.
This commit is contained in:
Joey Hess 2018-08-20 12:20:54 -04:00
parent 48fb6f9886
commit fa44bca8b3
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 50 additions and 44 deletions

View file

@ -11,6 +11,9 @@ git-annex (6.20180808) UNRELEASED; urgency=medium
pipe. This also avoids git buffering the whole file content in memory. pipe. This also avoids git buffering the whole file content in memory.
* v6: After updating the worktree for an add/drop, update git's index, * v6: After updating the worktree for an add/drop, update git's index,
so git status will not show the files as modified. so git status will not show the files as modified.
* linux standalone: When LOCPATH is already set, use it instead of the
bundled locales. It can be set to an empty string to use the system
locales too.
-- Joey Hess <id@joeyh.name> Wed, 08 Aug 2018 11:24:08 -0400 -- Joey Hess <id@joeyh.name> Wed, 08 Aug 2018 11:24:08 -0400

View file

@ -123,8 +123,10 @@ export MANPATH
unset LD_PRELOAD unset LD_PRELOAD
# Avoid using system locales, which may interact badly with bundled libc. # Avoid using system locales, which may interact badly with bundled libc.
# (But if LOCPATH is set, don't override it.)
ORIG_LOCPATH="$LOCPATH" ORIG_LOCPATH="$LOCPATH"
export ORIG_LOCPATH export ORIG_LOCPATH
if [ -z "${LOCPATH+set}" ]; then
LOCPATH="$HOME/.cache/git-annex/locales/$(echo "$base" | tr / _ )" LOCPATH="$HOME/.cache/git-annex/locales/$(echo "$base" | tr / _ )"
export LOCPATH export LOCPATH
@ -173,6 +175,7 @@ for localeenv in "$LANG" "$LANGUAGE" "$LC_CTYPE" "$LC_NUMERIC" "$LC_TIME" \
fi fi
fi fi
done done
fi
useproot="" useproot=""
case "$os" in case "$os" in