chiark / gitweb /
Merge branch 'use_date_from_apk_in_known_apks' into 'master'
[fdroidserver.git] / fdroidserver / common.py
index 88477b1836ffcacec38a3b53b442ad257c9e77ef..ce81b3855ba2f901690afc07d5a6284d4e3d189e 100644 (file)
@@ -58,7 +58,7 @@ default_config = {
         'r9b': None,
         'r10e': "$ANDROID_NDK",
     },
-    'build_tools': "23.0.3",
+    'build_tools': "24.0.0",
     'force_build_tools': False,
     'java_paths': None,
     'ant': "ant",
@@ -1796,7 +1796,8 @@ def set_FDroidPopen_env(build=None):
     set up the environment variables for the build environment
 
     There is only a weak standard, the variables used by gradle, so also set
-    up the most commonly used environment variables for SDK and NDK
+    up the most commonly used environment variables for SDK and NDK.  Also, if
+    there is no locale set, this will set the locale (e.g. LANG) to en_US.UTF-8.
     '''
     global env, orig_path
 
@@ -1808,6 +1809,15 @@ def set_FDroidPopen_env(build=None):
         for k, v in config['java_paths'].items():
             env['JAVA%s_HOME' % k] = v
 
+    missinglocale = True
+    for k, v in env.items():
+        if k == 'LANG' and v != 'C':
+            missinglocale = False
+        elif k == 'LC_ALL':
+            missinglocale = False
+    if missinglocale:
+        env['LANG'] = 'en_US.UTF-8'
+
     if build is not None:
         path = build.ndk_path()
         paths = orig_path.split(os.pathsep)