diff --git a/fdroidserver/common.py b/fdroidserver/common.py index 732d18d2..2c2bb4e0 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -1794,7 +1794,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 @@ -1806,6 +1807,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) diff --git a/tests/repo/urzip-πÇÇπÇÇ现代汉语通用字-български-عربي1234.apk b/tests/repo/urzip-πÇÇπÇÇ现代汉语通用字-български-عربي1234.apk new file mode 100644 index 00000000..0851e066 Binary files /dev/null and b/tests/repo/urzip-πÇÇπÇÇ现代汉语通用字-български-عربي1234.apk differ diff --git a/tests/repo/urzip.apk b/tests/repo/urzip.apk deleted file mode 100644 index ee5e5cba..00000000 Binary files a/tests/repo/urzip.apk and /dev/null differ diff --git a/tests/run-tests b/tests/run-tests index 62d27aa7..c55319da 100755 --- a/tests/run-tests +++ b/tests/run-tests @@ -138,6 +138,20 @@ $fdroid readmeta $fdroid update +#------------------------------------------------------------------------------# +echo_header "copy tests/repo, generate a keystore, and update" + +REPOROOT=`create_test_dir` +cd $REPOROOT +$fdroid init +cp -a $WORKSPACE/tests/metadata $WORKSPACE/tests/repo $REPOROOT/ +echo "accepted_formats = ['json', 'txt', 'xml', 'yml']" >> config.py +$fdroid update --verbose +test -e repo/index.xml +test -e repo/index.jar +grep -F '