mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-26 13:47:40 +00:00
Generate only .gz file for Contents index. #142
This commit is contained in:
@@ -24,6 +24,7 @@ type indexFile struct {
|
|||||||
parent *indexFiles
|
parent *indexFiles
|
||||||
discardable bool
|
discardable bool
|
||||||
compressable bool
|
compressable bool
|
||||||
|
onlyGzip bool
|
||||||
signable bool
|
signable bool
|
||||||
relativePath string
|
relativePath string
|
||||||
tempFilename string
|
tempFilename string
|
||||||
@@ -73,6 +74,9 @@ func (file *indexFile) Finalize(signer utils.Signer) error {
|
|||||||
exts := []string{""}
|
exts := []string{""}
|
||||||
if file.compressable {
|
if file.compressable {
|
||||||
exts = append(exts, ".gz", ".bz2")
|
exts = append(exts, ".gz", ".bz2")
|
||||||
|
if file.onlyGzip {
|
||||||
|
exts = []string{".gz"}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, ext := range exts {
|
for _, ext := range exts {
|
||||||
@@ -234,6 +238,7 @@ func (files *indexFiles) ContentsIndex(component, arch string, udeb bool) *index
|
|||||||
parent: files,
|
parent: files,
|
||||||
discardable: true,
|
discardable: true,
|
||||||
compressable: true,
|
compressable: true,
|
||||||
|
onlyGzip: true,
|
||||||
signable: false,
|
signable: false,
|
||||||
relativePath: relativePath,
|
relativePath: relativePath,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user