summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-02-09 09:44:47 +0100
committerMichał Górny <mgorny@gentoo.org>2022-02-09 09:44:47 +0100
commitcf8296ef1b8af1ffc8ab48567aa1aab558cfc517 (patch)
tree2d3900263446cee2f99578184b92a44c593b97d4
parentdistutils-r1.eclass: Add min version to tomli dep (diff)
downloadgentoo-cf8296ef1b8af1ffc8ab48567aa1aab558cfc517.tar.gz
gentoo-cf8296ef1b8af1ffc8ab48567aa1aab558cfc517.tar.bz2
gentoo-cf8296ef1b8af1ffc8ab48567aa1aab558cfc517.zip
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>
-rw-r--r--eclass/python-utils-r1.eclass2
1 files changed, 1 insertions, 1 deletions
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.