From 553daf85521238bbbe301c9baa8542e7c356d927 Mon Sep 17 00:00:00 2001 From: Christian Beier Date: Thu, 11 Mar 2021 15:52:25 +0100 Subject: [PATCH] update: take build subdir into account when looking for triple-t data Implemented as a fallback solution when parsing settings.gradle and globbing the build dir with "'*', 'src', '*', 'play'" did not yield results. Before, the logic would not find triple-t metadata in projects where settings.gradle is in a subdirectory or 'src' is found at a directory depth != 2. Closes fdroid/fdroiddata#2295 --- fdroidserver/update.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fdroidserver/update.py b/fdroidserver/update.py index fe119a15..988c65a2 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -1058,6 +1058,8 @@ def copy_triple_t_store_metadata(apps): gradle_subdirs.add(p) if not gradle_subdirs: gradle_subdirs.update(glob.glob(os.path.join('build', packageName, '*', 'src', '*', 'play'))) + if not gradle_subdirs and len(app.get('Builds', [])) and app.get('Builds', [])[-1].subdir: + gradle_subdirs.update(glob.glob(os.path.join('build', packageName, app.get('Builds', [])[-1].subdir, 'src', '*', 'play'))) for d in gradle_subdirs: logging.debug('Triple-T Gradle Play Publisher: ' + d)