summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-10-10 14:22:15 -0400
committerMike Frysinger <vapier@gentoo.org>2015-10-10 14:22:54 -0400
commit699fde68df48c504dbea6983a77551a013ca8d4d (patch)
tree5b4aba70c1e7cb364904851073a90004782f56e2 /eclass/python-utils-r1.eclass
parentconvert `mktemp` to `emktemp` from eutils (diff)
downloadgentoo-699fde68df48c504dbea6983a77551a013ca8d4d.tar.gz
gentoo-699fde68df48c504dbea6983a77551a013ca8d4d.tar.bz2
gentoo-699fde68df48c504dbea6983a77551a013ca8d4d.zip
python-utils-r1.eclass: python_export_utf8_locale: do not spew warnings when `locale` is not available
If the `locale` isn't available, there's nothing this func can do, so just return quickly and assume the system is sane.
Diffstat (limited to 'eclass/python-utils-r1.eclass')
-rw-r--r--eclass/python-utils-r1.eclass3
1 files changed, 3 insertions, 0 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 622cb591c42d..a80bdf436eb8 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -1117,6 +1117,9 @@ python_fix_shebang() {
python_export_utf8_locale() {
debug-print-function ${FUNCNAME} "${@}"
+ # If the locale program isn't available, just return.
+ type locale >/dev/null || return 0
+
if [[ $(locale charmap) != UTF-8 ]]; then
if [[ -n ${LC_ALL} ]]; then
ewarn "LC_ALL is set to a locale with a charmap other than UTF-8."