]> git.mxchange.org Git - quix0rs-apt-p2p.git/blobdiff - apt_dht/AptPackages.py
Decompress needed files while downloading them.
[quix0rs-apt-p2p.git] / apt_dht / AptPackages.py
index ce462b317bb193298a946c858e6bd380f1434483..a2e743e60fde74f07c9c9bed7d6132b6e66f9d4a 100644 (file)
@@ -17,6 +17,8 @@ from apt import OpProgress
 
 apt_pkg.init()
 
+TRACKED_FILES = ['release', 'sources', 'packages']
+
 class PackageFileList(DictMixin):
     """Manages a list of package files belonging to a backend.
     
@@ -48,7 +50,7 @@ class PackageFileList(DictMixin):
         fake lists and sources.list.
         """
         filename = cache_path.split('/')[-1]
-        if filename=="Packages" or filename=="Release" or filename=="Sources":
+        if filename.lower() in TRACKED_FILES:
             log.msg("Registering package file: "+cache_path)
             self.packages[cache_path] = file_path
             return True