From: Ciaran Gultnieks Date: Thu, 20 Sep 2012 13:14:18 +0000 (+0100) Subject: Remove already built disabled builds from repo X-Git-Tag: 0.1~743 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=b321e26a65bf9a2d92489dc1e4501c8b5089a5df;p=fdroidserver.git Remove already built disabled builds from repo --- 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')):