Generate only .gz file for Contents index. #142

This commit is contained in:
Andrey Smirnov
2015-04-02 00:08:57 +03:00
parent 3886db9d4f
commit 138f9f7994

View File

@@ -24,6 +24,7 @@ type indexFile struct {
parent *indexFiles
discardable bool
compressable bool
onlyGzip bool
signable bool
relativePath string
tempFilename string
@@ -73,6 +74,9 @@ func (file *indexFile) Finalize(signer utils.Signer) error {
exts := []string{""}
if file.compressable {
exts = append(exts, ".gz", ".bz2")
if file.onlyGzip {
exts = []string{".gz"}
}
}
for _, ext := range exts {
@@ -234,6 +238,7 @@ func (files *indexFiles) ContentsIndex(component, arch string, udeb bool) *index
parent: files,
discardable: true,
compressable: true,
onlyGzip: true,
signable: false,
relativePath: relativePath,
}