mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-01-12 03:21:33 +00:00
add AddonIndex to index_files
I had to remove "signable: false" (line 399), since that property doesn't exist.
This commit is contained in:
@@ -389,6 +389,27 @@ func (files *indexFiles) LegacyContentsIndex(arch string, udeb bool) *indexFile
|
||||
return file
|
||||
}
|
||||
|
||||
func (files *indexFiles) AddonIndex(component, path string) *indexFile {
|
||||
key := fmt.Sprintf("ai-%s-%s", component, path)
|
||||
file, ok := files.indexes[key]
|
||||
|
||||
if !ok {
|
||||
relativePath := filepath.Join(component, path)
|
||||
|
||||
file = &indexFile{
|
||||
parent: files,
|
||||
discardable: false,
|
||||
compressable: false,
|
||||
onlyGzip: false,
|
||||
relativePath: relativePath,
|
||||
}
|
||||
|
||||
files.indexes[key] = file
|
||||
}
|
||||
|
||||
return file
|
||||
}
|
||||
|
||||
func (files *indexFiles) ReleaseFile() *indexFile {
|
||||
return &indexFile{
|
||||
parent: files,
|
||||
|
||||
Reference in New Issue
Block a user