python-utils-r1.eclass: Silence missing locale(1) error

The python_export_utf8_locale() function checks for missing locale(1)
and handles it gracefully.  However, it does not redirect stderr
probably, so systems without the executable (e.g. musl) get unintended
console output.  Redirect it to /dev/null.

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2022-02-09 09:44:47 +01:00
parent 02f047d780
commit cf8296ef1b

View File

@@ -1178,7 +1178,7 @@ python_export_utf8_locale() {
debug-print-function ${FUNCNAME} "${@}"
# If the locale program isn't available, just return.
type locale >/dev/null || return 0
type locale &>/dev/null || return 0
if [[ $(locale charmap) != UTF-8 ]]; then
# Try English first, then everything else.