From 78bee1990c1906b379de15c484bce0684906a49d Mon Sep 17 00:00:00 2001 From: Ciaran Gultnieks Date: Tue, 4 Mar 2014 23:35:46 +0000 Subject: [PATCH] Remove apks with no metadata (unless told to create it) --- fdroidserver/update.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fdroidserver/update.py b/fdroidserver/update.py index 43873d10..939af587 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -994,8 +994,12 @@ def main(): f.close() logging.info("Generated skeleton metadata for " + apk['id']) else: - logging.warn(apk['apkname'] + " (" + apk['id'] + ") has no metadata") - logging.info(" " + apk['name'] + " - " + apk['version']) + logging.warn(apk['apkname'] + " (" + apk['id'] + ") has no metadata - removing") + rmf = os.path.join(repodirs[0], apk['apkname']) + if not os.path.exists(rmf): + logging.error("Could not find {0} to remove it".format(rmf)) + else: + os.remove(rmf) if len(repodirs) > 1: archive_old_apks(apps, apks, archapks, repodirs[0], repodirs[1], config['archive_older'])