1 |
commit: 699fde68df48c504dbea6983a77551a013ca8d4d |
2 |
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Oct 10 18:22:15 2015 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Oct 10 18:22:54 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=699fde68 |
7 |
|
8 |
python-utils-r1.eclass: python_export_utf8_locale: do not spew warnings when `locale` is not available |
9 |
|
10 |
If the `locale` isn't available, there's nothing this func can do, |
11 |
so just return quickly and assume the system is sane. |
12 |
|
13 |
eclass/python-utils-r1.eclass | 3 +++ |
14 |
1 file changed, 3 insertions(+) |
15 |
|
16 |
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass |
17 |
index 622cb59..a80bdf4 100644 |
18 |
--- a/eclass/python-utils-r1.eclass |
19 |
+++ b/eclass/python-utils-r1.eclass |
20 |
@@ -1117,6 +1117,9 @@ python_fix_shebang() { |
21 |
python_export_utf8_locale() { |
22 |
debug-print-function ${FUNCNAME} "${@}" |
23 |
|
24 |
+ # If the locale program isn't available, just return. |
25 |
+ type locale >/dev/null || return 0 |
26 |
+ |
27 |
if [[ $(locale charmap) != UTF-8 ]]; then |
28 |
if [[ -n ${LC_ALL} ]]; then |
29 |
ewarn "LC_ALL is set to a locale with a charmap other than UTF-8." |