From cf8296ef1b8af1ffc8ab48567aa1aab558cfc517 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Wed, 9 Feb 2022 09:44:47 +0100 Subject: [PATCH] python-utils-r1.eclass: Silence missing locale(1) error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- 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 ab333aaf15ebc..204392e08da4c 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.