From b321e26a65bf9a2d92489dc1e4501c8b5089a5df Mon Sep 17 00:00:00 2001 From: Ciaran Gultnieks Date: Thu, 20 Sep 2012 14:14:18 +0100 Subject: [PATCH] Remove already built disabled builds from repo --- fdroidserver/update.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/fdroidserver/update.py b/fdroidserver/update.py index a7dceaaf..ac8fc2c8 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -235,6 +235,21 @@ def main(): else: apkcache = {} cachechanged = False + + # Check repo directory for disabled builds and remove them... + for app in apps: + for build in app['builds']: + if build['commit'].startswith('!'): + apkfilename = app['id'] + '_' + str(build['vercode']) + '.apk' + apkpath = os.path.join('repo', apkfilename) + srcpath = apkfilename[:-4] + "_src.tar.gz" + for name in [apkpath, srcpath]: + if os.path.exists(name): + print "Deleting disabled build output " + apkfilename + os.remove(name) + if apkcache.has_key(apkfilename): + del apkcache[apkfilename] + apks = [] for apkfile in glob.glob(os.path.join('repo','*.apk')): -- 2.30.2