From 431c457ab5dd067044c20716b5dfdc64ea6a7046 Mon Sep 17 00:00:00 2001 From: Joerg Jaspert Date: Thu, 24 Mar 2011 12:54:17 +0100 Subject: [PATCH] incomplete, non-working, just to give over Signed-off-by: Joerg Jaspert --- dak/generate_releases2.py | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) 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 -- 2.39.5