From 548f73d98877c3d69323daa9d3e3b8d5defc68bf Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 22 Feb 2019 21:32:33 +0100 Subject: [PATCH 1/2] nightly: search subdirs called 'fdroid' for APKs @MTRNord tracked down this bug while working on his app https://gitlab.com/Nordgedanken/simplematrix --- fdroidserver/nightly.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fdroidserver/nightly.py b/fdroidserver/nightly.py index 9579ae50..e6f766c0 100644 --- a/fdroidserver/nightly.py +++ b/fdroidserver/nightly.py @@ -249,8 +249,8 @@ Last updated: {date}'''.format(repo_git_base=repo_git_base, common.assert_config_keystore(config) for root, dirs, files in os.walk(cibase): - for d in ('fdroid', '.git', '.gradle'): - if d in dirs: + for d in dirs: + if d == '.git' or d == '.gradle' or (d == 'fdroid' and root == cibase): dirs.remove(d) for f in files: if f.endswith('-debug.apk'): From 7798dcf9dd7c6a5f04bf82ded82661087d77a5e0 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 22 Feb 2019 21:38:20 +0100 Subject: [PATCH 2/2] index: keep mirrors in the order specified in config.py The mirrors are displayed in fdroidclient in the order they are received, and there might be some reason why a repo maintainer wants them in a specific order. The danger is that if the mirrors are set in config.py using "mirrors = {'foo', bar'}" they will have a randomized order since it will be in a set. They should be set using [] or () to have a fixed order. --- fdroidserver/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fdroidserver/index.py b/fdroidserver/index.py index d8477dc5..29027a38 100644 --- a/fdroidserver/index.py +++ b/fdroidserver/index.py @@ -88,7 +88,7 @@ def make(apps, sortedids, apks, repodir, archive): mirrorcheckfailed = False mirrors = [] - for mirror in sorted(common.config.get('mirrors', [])): + for mirror in common.config.get('mirrors', []): base = os.path.basename(urllib.parse.urlparse(mirror).path.rstrip('/')) if common.config.get('nonstandardwebroot') is not True and base != 'fdroid': logging.error(_("mirror '%s' does not end with 'fdroid'!") % mirror)