mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-04-19 19:28:22 +00:00
Keep checksum of not compressed index file even if it's not uploaded
Fixes: #756
This commit is contained in:
@@ -77,14 +77,17 @@ func (file *indexFile) Finalize(signer pgp.Signer) error {
|
||||
file.tempFile.Close()
|
||||
|
||||
exts := []string{""}
|
||||
cksumExts := exts
|
||||
if file.compressable {
|
||||
exts = append(exts, ".gz", ".bz2")
|
||||
cksumExts = exts
|
||||
if file.onlyGzip {
|
||||
exts = []string{".gz"}
|
||||
cksumExts = []string{"", ".gz"}
|
||||
}
|
||||
}
|
||||
|
||||
for _, ext := range exts {
|
||||
for _, ext := range cksumExts {
|
||||
var checksumInfo utils.ChecksumInfo
|
||||
|
||||
checksumInfo, err = utils.ChecksumsForFile(file.tempFilename + ext)
|
||||
|
||||
@@ -69,6 +69,10 @@ class PublishRepo1Test(BaseTest):
|
||||
pathsSeen = set()
|
||||
for l in release:
|
||||
fileHash, fileSize, path = l.split()
|
||||
if "Contents" in path and not path.endswith(".gz"):
|
||||
# "Contents" are present in index, but not really written to disk
|
||||
continue
|
||||
|
||||
pathsSeen.add(path)
|
||||
|
||||
fileSize = int(fileSize)
|
||||
@@ -464,6 +468,10 @@ class PublishRepo17Test(BaseTest):
|
||||
pathsSeen = set()
|
||||
for l in release:
|
||||
fileHash, fileSize, path = l.split()
|
||||
if "Contents" in path and not path.endswith(".gz"):
|
||||
# "Contents" are present in index, but not really written to disk
|
||||
continue
|
||||
|
||||
pathsSeen.add(path)
|
||||
|
||||
fileSize = int(fileSize)
|
||||
|
||||
@@ -79,6 +79,10 @@ class PublishSnapshot1Test(BaseTest):
|
||||
pathsSeen = set()
|
||||
for l in release:
|
||||
fileHash, fileSize, path = l.split()
|
||||
if "Contents" in path and not path.endswith(".gz"):
|
||||
# "Contents" are present in index, but not really written to disk
|
||||
continue
|
||||
|
||||
pathsSeen.add(path)
|
||||
|
||||
fileSize = int(fileSize)
|
||||
@@ -724,6 +728,10 @@ class PublishSnapshot26Test(BaseTest):
|
||||
pathsSeen = set()
|
||||
for l in release:
|
||||
fileHash, fileSize, path = l.split()
|
||||
if "Contents" in path and not path.endswith(".gz"):
|
||||
# "Contents" are present in index, but not really written to disk
|
||||
continue
|
||||
|
||||
pathsSeen.add(path)
|
||||
|
||||
fileSize = int(fileSize)
|
||||
@@ -947,6 +955,10 @@ class PublishSnapshot35Test(BaseTest):
|
||||
pathsSeen = set()
|
||||
for l in release:
|
||||
fileHash, fileSize, path = l.split()
|
||||
if "Contents" in path and not path.endswith(".gz"):
|
||||
# "Contents" are present in index, but not really written to disk
|
||||
continue
|
||||
|
||||
pathsSeen.add(path)
|
||||
|
||||
fileSize = int(fileSize)
|
||||
|
||||
@@ -61,6 +61,10 @@ class PublishSwitch1Test(BaseTest):
|
||||
pathsSeen = set()
|
||||
for l in release:
|
||||
fileHash, fileSize, path = l.split()
|
||||
if "Contents" in path and not path.endswith(".gz"):
|
||||
# "Contents" are present in index, but not really written to disk
|
||||
continue
|
||||
|
||||
pathsSeen.add(path)
|
||||
|
||||
fileSize = int(fileSize)
|
||||
@@ -321,6 +325,10 @@ class PublishSwitch8Test(BaseTest):
|
||||
pathsSeen = set()
|
||||
for l in release:
|
||||
fileHash, fileSize, path = l.split()
|
||||
if "Contents" in path and not path.endswith(".gz"):
|
||||
# "Contents" are present in index, but not really written to disk
|
||||
continue
|
||||
|
||||
pathsSeen.add(path)
|
||||
|
||||
fileSize = int(fileSize)
|
||||
@@ -506,6 +514,10 @@ class PublishSwitch14Test(BaseTest):
|
||||
pathsSeen = set()
|
||||
for l in release:
|
||||
fileHash, fileSize, path = l.split()
|
||||
if "Contents" in path and not path.endswith(".gz"):
|
||||
# "Contents" are present in index, but not really written to disk
|
||||
continue
|
||||
|
||||
pathsSeen.add(path)
|
||||
|
||||
fileSize = int(fileSize)
|
||||
|
||||
@@ -61,6 +61,10 @@ class PublishUpdate1Test(BaseTest):
|
||||
pathsSeen = set()
|
||||
for l in release:
|
||||
fileHash, fileSize, path = l.split()
|
||||
if "Contents" in path and not path.endswith(".gz"):
|
||||
# "Contents" are present in index, but not really written to disk
|
||||
continue
|
||||
|
||||
pathsSeen.add(path)
|
||||
|
||||
fileSize = int(fileSize)
|
||||
@@ -402,6 +406,10 @@ class PublishUpdate12Test(BaseTest):
|
||||
pathsSeen = set()
|
||||
for l in release:
|
||||
fileHash, fileSize, path = l.split()
|
||||
if "Contents" in path and not path.endswith(".gz"):
|
||||
# "Contents" are present in index, but not really written to disk
|
||||
continue
|
||||
|
||||
pathsSeen.add(path)
|
||||
|
||||
fileSize = int(fileSize)
|
||||
|
||||
Reference in New Issue
Block a user