From: Joerg Jaspert Date: Thu, 24 Mar 2011 11:54:17 +0000 (+0100) Subject: incomplete, non-working, just to give over X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=431c457ab5dd067044c20716b5dfdc64ea6a7046;p=dak incomplete, non-working, just to give over Signed-off-by: Joerg Jaspert --- diff --git a/dak/generate_releases2.py b/dak/generate_releases2.py index c891db9a..c1a7645e 100755 --- a/dak/generate_releases2.py +++ b/dak/generate_releases2.py @@ -181,9 +181,31 @@ def generate_release_files(suite, tmppath): for entry in filenames: if not re_includeinarelease.match(entry): continue - filename=os.path.join(dirpath.lstrip('./'), entry) + if entry.endswith(".gz"): + filename="zcat|%s" % (os.path.join(dirpath.lstrip('./'), entry)) + elif entry.endswith(".bz2"): + filename="bzcat|%s" % (os.path.join(dirpath.lstrip('./'), entry)) + else: + filename=os.path.join(dirpath.lstrip('./'), entry) files.append(filename) + decompressors = { 'zcat' : gzip.GzipFile, + 'bzcat' : bz2.BZ2File } + + hashfuncs = { 'MD5Sum' : apt_pkg.md5sum, + 'SHA1' : apt_pkg.sha1sum, + 'SHA256' : apt_pkg.sha256sum } + + for entry in files: + entryhash = "" + entrylen = "" + comp = None + if entry.find('|') > 0: + k=entry.split('|') + comp=k[0] + filename=k[1] + else: + filename=entry os.chdir(oldcwd) return