From f604d845f5d967b4f6d9d5e4d1ffacfa4478d89d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Mart=C3=AD?= Date: Sat, 14 Nov 2015 10:24:43 +0100 Subject: [PATCH] checkupdates: find new subdirs for autonames too The same method used for Tags and RepoManifest. --- fdroidserver/checkupdates.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/fdroidserver/checkupdates.py b/fdroidserver/checkupdates.py index 2c1fc1af..2fd3d3cd 100644 --- a/fdroidserver/checkupdates.py +++ b/fdroidserver/checkupdates.py @@ -334,25 +334,28 @@ def fetch_autoname(app, tag): return None if app['Repo Type'] == 'srclib': - app_dir = os.path.join('build', 'srclib', app['Repo']) + build_dir = os.path.join('build', 'srclib', app['Repo']) else: - app_dir = os.path.join('build', app['id']) + build_dir = os.path.join('build', app['id']) try: - vcs = common.getvcs(app["Repo Type"], app["Repo"], app_dir) + vcs = common.getvcs(app["Repo Type"], app["Repo"], build_dir) vcs.gotorevision(tag) except VCSException: return None flavours = [] if len(app['builds']) > 0: - if app['builds'][-1]['subdir']: - app_dir = os.path.join(app_dir, app['builds'][-1]['subdir']) if app['builds'][-1]['gradle']: flavours = app['builds'][-1]['gradle'] - logging.debug("...fetch auto name from " + app_dir) - new_name = common.fetch_real_name(app_dir, flavours) + logging.debug("...fetch auto name from " + build_dir) + for subdir in possible_subdirs(app): + if subdir == '.': + root_dir = build_dir + else: + root_dir = os.path.join(build_dir, subdir) + new_name = common.fetch_real_name(root_dir, flavours) commitmsg = None if new_name: logging.debug("...got autoname '" + new_name + "'") -- 2.30.2