from os.path import dirname, basename
import re, shelve, shutil, fcntl
from twisted.internet import process
-import apt_proxy, copy, UserDict
-from misc import log
+import copy, UserDict
-aptpkg_dir='.apt-proxy'
+aptpkg_dir='.apt-dht'
apt_pkg.InitSystem()
class AptDpkgInfo(UserDict.UserDict):
"""
def __init__(self, backendName, cache_dir):
self.cache_dir = cache_dir
- self.packagedb_dir = cache_dir+'/'+ apt_proxy.status_dir + \
+ self.packagedb_dir = cache_dir+'/'+ aptpkg_dir + \
'/backends/' + backendName
if not os.path.exists(self.packagedb_dir):
os.makedirs(self.packagedb_dir)
# we should probably clear old entries from self.packages and
# take into account the recorded mtime as optimization
filepath = self.cache_dir + file
- fake_uri='http://apt-proxy/'+file
+ fake_uri='http://apt-dht/'+file
source_line='deb '+dirname(fake_uri)+'/ /'
listpath=(self.status_dir+'/apt/lists/'
+apt_pkg.URItoFileName(fake_uri))
print "\t%s:%s"%(ver)
print "Guess:"
print "\t%s:%s"%(info['Version'], closest_match(info, vers))
+
if __name__ == '__main__':
from apt_proxy_conf import factoryConfig
class DummyFactory: