1 |
commit: cf8296ef1b8af1ffc8ab48567aa1aab558cfc517 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Feb 9 08:44:47 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Feb 9 08:44:47 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf8296ef |
7 |
|
8 |
python-utils-r1.eclass: Silence missing locale(1) error |
9 |
|
10 |
The python_export_utf8_locale() function checks for missing locale(1) |
11 |
and handles it gracefully. However, it does not redirect stderr |
12 |
probably, so systems without the executable (e.g. musl) get unintended |
13 |
console output. Redirect it to /dev/null. |
14 |
|
15 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
16 |
|
17 |
eclass/python-utils-r1.eclass | 2 +- |
18 |
1 file changed, 1 insertion(+), 1 deletion(-) |
19 |
|
20 |
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass |
21 |
index ab333aaf15eb..204392e08da4 100644 |
22 |
--- a/eclass/python-utils-r1.eclass |
23 |
+++ b/eclass/python-utils-r1.eclass |
24 |
@@ -1178,7 +1178,7 @@ python_export_utf8_locale() { |
25 |
debug-print-function ${FUNCNAME} "${@}" |
26 |
|
27 |
# If the locale program isn't available, just return. |
28 |
- type locale >/dev/null || return 0 |
29 |
+ type locale &>/dev/null || return 0 |
30 |
|
31 |
if [[ $(locale charmap) != UTF-8 ]]; then |
32 |
# Try English first, then everything else. |