]> git.decadent.org.uk Git - dak.git/commitdiff
generate-releases: Use the right key when testing uncompnotseen
authorNiels Thykier <niels@thykier.net>
Fri, 4 Sep 2015 16:38:02 +0000 (18:38 +0200)
committerNiels Thykier <niels@thykier.net>
Fri, 4 Sep 2015 17:23:06 +0000 (19:23 +0200)
This issue caused dak to not generate hashes for uncompressed Contents
files for some architectures in some components.  A bit of context,
there were up to 4 Contents files per architecture:

 * Contents-ARCH
 * main/Contents-ARCH
 * contrib/Contents-ARCH
 * non-free/Contents-ARCH

Any */Contents-ARCH that appeared on the filesystem AFTER the legacy
"Contents-ARCH" would be ignored, because generate-releases used the
wrong key to check if the file was already in uncompnotseen.

Signed-off-by: Niels Thykier <niels@thykier.net>
dak/generate_releases.py

index 12f09633675dd0f37bfa699ba4897165e65ac600..2814b24a61b7ea78eea776367fe518d7fbf1d6dd 100755 (executable)
@@ -246,11 +246,11 @@ class ReleaseWriter(object):
                 # If we find a file for which we have a compressed version and
                 # haven't yet seen the uncompressed one, store the possibility
                 # for future use
-                if entry.endswith(".gz") and entry[:-3] not in uncompnotseen:
+                if entry.endswith(".gz") and filename[:-3] not in uncompnotseen:
                     uncompnotseen[filename[:-3]] = (gzip.GzipFile, filename)
-                elif entry.endswith(".bz2") and entry[:-4] not in uncompnotseen:
+                elif entry.endswith(".bz2") and filename[:-4] not in uncompnotseen:
                     uncompnotseen[filename[:-4]] = (bz2.BZ2File, filename)
-                elif entry.endswith(".xz") and entry[:-3] not in uncompnotseen:
+                elif entry.endswith(".xz") and filename[:-3] not in uncompnotseen:
                     uncompnotseen[filename[:-3]] = (XzFile, filename)
 
                 fileinfo[filename]['len'] = len(contents)