chiark / gitweb /
update: write cache file if anything has changed it
authorHans-Christoph Steiner <hans@eds.org>
Thu, 29 Jun 2017 18:28:16 +0000 (20:28 +0200)
committerHans-Christoph Steiner <hans@eds.org>
Mon, 3 Jul 2017 08:02:51 +0000 (10:02 +0200)
This fixes a bug introduced in 04db6870 where cachechanged for scan_apks()
was set only by the last call to scan_apk().

fdroidserver/update.py

index 151d6552c02f17b63324a42c182fb1066c93d8ac..1e368f6ed686831e05e4601b9a3a6c051dd9d669 100644 (file)
@@ -1385,11 +1385,12 @@ def scan_apks(apkcache, repodir, knownapks, use_date_from_apk=False):
     for apkfile in sorted(glob.glob(os.path.join(repodir, '*.apk'))):
         apkfilename = apkfile[len(repodir) + 1:]
         ada = options.allow_disabled_algorithms or config['allow_disabled_algorithms']
-        (skip, apk, cachechanged) = scan_apk(apkcache, apkfilename, repodir, knownapks,
-                                             use_date_from_apk, ada, True)
+        (skip, apk, cachethis) = scan_apk(apkcache, apkfilename, repodir, knownapks,
+                                          use_date_from_apk, ada, True)
         if skip:
             continue
         apks.append(apk)
+        cachechanged = cachechanged or cachethis
 
     return apks, cachechanged