[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][ftp-team/dak][deploy] 3 commits: pdiffs.py: Only X-Download fields should have .gz extension



Title: GitLab

Joerg Jaspert pushed to branch deploy at Debian FTP Team / dak

Commits:

1 changed file:

Changes:

  • daklib/pdiff.py
    ... ... @@ -9,12 +9,12 @@ from daklib import daksubprocess
    9 9
     from daklib.dakapt import DakHashes
    
    10 10
     
    
    11 11
     HASH_FIELDS = [
    
    12
    -    ('SHA1-History', 0, 1),
    
    13
    -    ('SHA256-History', 0, 2),
    
    14
    -    ('SHA1-Patches', 1, 1),
    
    15
    -    ('SHA256-Patches', 1, 2),
    
    16
    -    ('SHA1-Download', 2, 1),
    
    17
    -    ('SHA256-Download', 2, 2),
    
    12
    +    ('SHA1-History', 0, 1, ""),
    
    13
    +    ('SHA256-History', 0, 2, ""),
    
    14
    +    ('SHA1-Patches', 1, 1, ""),
    
    15
    +    ('SHA256-Patches', 1, 2, ""),
    
    16
    +    ('SHA1-Download', 2, 1, ".gz"),
    
    17
    +    ('SHA256-Download', 2, 2, ".gz"),
    
    18 18
     ]
    
    19 19
     
    
    20 20
     HASH_FIELDS_TABLE = {x[0]: (x[1], x[2]) for x in HASH_FIELDS}
    
    ... ... @@ -216,11 +216,11 @@ class PDiffIndex(object):
    216 216
             hs = self.history
    
    217 217
             order = self.history_order
    
    218 218
     
    
    219
    -        for fieldname, ind, hashind in HASH_FIELDS:
    
    219
    +        for fieldname, ind, hashind, ext in HASH_FIELDS:
    
    220 220
                 out.write("%s:\n" % fieldname)
    
    221 221
                 for h in order:
    
    222 222
                     if hs[h][ind] and hs[h][ind][hashind]:
    
    223
    -                    out.write(" %s %7d %s.gz\n" % (hs[h][ind][hashind], hs[h][ind].size, h))
    
    223
    +                    out.write(" %s %7d %s%s\n" % (hs[h][ind][hashind], hs[h][ind].size, h, ext))
    
    224 224
     
    
    225 225
         def update_index(self, tmp_suffix=".new"):
    
    226 226
             if not os.path.isdir(self.patches_dir):
    


  • Reply to: