chiark / gitweb /
Transfer apk info when archiving
authorCiaran Gultnieks <ciaran@ciarang.com>
Thu, 9 Jan 2014 12:33:48 +0000 (12:33 +0000)
committerDaniel Martí <mvdan@mvdan.cc>
Thu, 9 Jan 2014 15:23:49 +0000 (16:23 +0100)
Just dropping this apk entry temporarily caused an old version of the
app to appear on the wiki as a failing build. (only for one cycle after
the archiving happened). Moving it to the archived apks list ought to
resolve that problem.

fdroidserver/update.py

index ce976e72ad87cca6d2d3663b7a118c7977e999bf..e204b6385eb62dccabd4c279a57e61300e42657e 100644 (file)
@@ -828,7 +828,7 @@ def make_index(apps, apks, repodir, archive, categories):
 
 
 
-def archive_old_apks(apps, apks, repodir, archivedir, defaultkeepversions):
+def archive_old_apks(apps, apks, archapks, repodir, archivedir, defaultkeepversions):
 
     for app in apps:
 
@@ -854,6 +854,7 @@ def archive_old_apks(apps, apks, repodir, archivedir, defaultkeepversions):
                 if 'srcname' in apk:
                     shutil.move(os.path.join(repodir, apk['srcname']),
                         os.path.join(archivedir, apk['srcname']))
+                archapks.append(apk)
                 apks.remove(apk)
 
 
@@ -1013,7 +1014,7 @@ def main():
                 print "       " + apk['name'] + " - " + apk['version']
 
     if len(repodirs) > 1:
-        archive_old_apks(apps, apks, repodirs[0], repodirs[1], config['archive_older'])
+        archive_old_apks(apps, apks, archapks, repodirs[0], repodirs[1], config['archive_older'])
 
     # Make the index for the main repo...
     make_index(apps, apks, repodirs[0], False, categories)