commit: cf8296ef1b8af1ffc8ab48567aa1aab558cfc517
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 9 08:44:47 2022 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Feb 9 08:44:47 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf8296ef
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 <AT> gentoo.org>
eclass/python-utils-r1.eclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index ab333aaf15eb..204392e08da4 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -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.