chiark / gitweb /
Don't need the date calculation code any more
authorCiaran Gultnieks <ciaran@ciarang.com>
Sat, 28 Jan 2012 18:02:14 +0000 (18:02 +0000)
committerCiaran Gultnieks <ciaran@ciarang.com>
Sat, 28 Jan 2012 18:02:14 +0000 (18:02 +0000)
update.py

index a9de2a58db31b8868a91c712592aeeb551b9d71e..4c07f5d22132bc197e6490b0d0d3f7f482db84b5 100755 (executable)
--- 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