From: Ciaran Gultnieks Date: Sat, 28 Jan 2012 18:02:14 +0000 (+0000) Subject: Don't need the date calculation code any more X-Git-Tag: 0.1~1016 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=2b1b2e7497638ea1babf1dbb1150f863f77f43c1;p=fdroidserver.git Don't need the date calculation code any more --- diff --git a/update.py b/update.py index a9de2a58..4c07f5d2 100755 --- a/update.py +++ b/update.py @@ -473,42 +473,6 @@ shutil.copyfile(repo_icon, iconfilename) knownapks = common.KnownApks() for apk in apks: knownapks.recordapk(apk['apkname'], apk['id']) - - app, added = knownapks.getapp(apk['apkname']) - if not added: - print 'Need a date for ' + apk['apkname'] - p = subprocess.Popen('git log --format="%ci" metadata/' + apk['id'] + '.txt | tail -n 1', - shell=True, stdout = subprocess.PIPE) - d = p.communicate()[0][:10] - if len(d) == 0: - print "...didn't find a metadata commit" - else: - print '...metadata committed:' + d - if apk['apkname'].startswith(apk['id']): - vercode = int(apk['apkname'][len(apk['id'])+1:-4]) - print '...built vercode:' + str(vercode) - expr = 'Build Version:[^,]+,' + str(vercode) + ',.*' - p = subprocess.Popen('git log --format="%ci" -S"' + expr + '" --pickaxe-regex metadata/' + apk['id'] + '.txt | tail -n 1', - shell=True, stdout = subprocess.PIPE) - d = p.communicate()[0][:10] - if len(d) > 0: - print '...build line added:' + d - print '...using that!' - knownapks.apks[apk['apkname']] = (apk['id'], time.strptime(d, '%Y-%m-%d')) - knownapks.changed = True - else: - print "...didn't find addition of build line" - else: - oldestvercode = 99999999 - for apk2 in apks: - if apk2['id'] == apk['id']: - if apk2['versioncode'] < oldestvercode: - oldestvercode = apk2['versioncode'] - if oldestvercode == apk['versioncode']: - print '...oldest non-built apk - using metadata commit date' - knownapks.apks[apk['apkname']] = (apk['id'], time.strptime(d, '%Y-%m-%d')) - knownapks.changed = True - knownapks.writeifchanged() # Generate latest apps HTML for widget