chiark / gitweb /
remove unused 'apps' argument from update.scan_apks()
authorHans-Christoph Steiner <hans@eds.org>
Thu, 13 Oct 2016 15:28:54 +0000 (17:28 +0200)
committerHans-Christoph Steiner <hans@eds.org>
Wed, 2 Nov 2016 15:11:52 +0000 (16:11 +0100)
fdroidserver/update.py
tests/update.TestCase

index d18f0fd3cf12973347a05f614e0dce5487dad068..a93d982ebffcdbd8b6924393107b0cc1e3b8105f 100644 (file)
@@ -504,12 +504,11 @@ def insert_obbs(repodir, apps, apks):
                 break
 
 
-def scan_apks(apps, apkcache, repodir, knownapks, use_date_from_apk=False):
+def scan_apks(apkcache, repodir, knownapks, use_date_from_apk=False):
     """Scan the apks in the given repo directory.
 
     This also extracts the icons.
 
-    :param apps: list of all applications, as per metadata.read_metadata
     :param apkcache: current apk cache information
     :param repodir: repo directory to scan
     :param knownapks: known apks info
@@ -1394,7 +1393,7 @@ def main():
     delete_disabled_builds(apps, apkcache, repodirs)
 
     # Scan all apks in the main repo
-    apks, cachechanged = scan_apks(apps, apkcache, repodirs[0], knownapks, options.use_date_from_apk)
+    apks, cachechanged = scan_apks(apkcache, repodirs[0], knownapks, options.use_date_from_apk)
 
     # Generate warnings for apk's with no metadata (or create skeleton
     # metadata files, if requested on the command line)
@@ -1438,7 +1437,7 @@ def main():
 
     # Scan the archive repo for apks as well
     if len(repodirs) > 1:
-        archapks, cc = scan_apks(apps, apkcache, repodirs[1], knownapks, options.use_date_from_apk)
+        archapks, cc = scan_apks(apkcache, repodirs[1], knownapks, options.use_date_from_apk)
         if cc:
             cachechanged = True
     else:
index e29279326a96b19e60c3141b9d36e68294a73027..25e59a83531931ef606357850d998cfa54e6c161 100755 (executable)
@@ -101,7 +101,7 @@ class UpdateTest(unittest.TestCase):
 
         apps = fdroidserver.metadata.read_metadata(xref=True)
         knownapks = fdroidserver.common.KnownApks()
-        apks, cachechanged = fdroidserver.update.scan_apks(apps, {}, 'repo', knownapks, False)
+        apks, cachechanged = fdroidserver.update.scan_apks({}, 'repo', knownapks, False)
         self.assertEqual(len(apks), 6)
         apk = apks[0]
         self.assertEqual(apk['minSdkVersion'], '4')