mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-02 04:50:49 +00:00
Combine publish list progress into one
This commit is contained in:
committed by
Lorenzo Bolla
parent
b0ab8f417d
commit
3cd168c44d
+9
-8
@@ -588,6 +588,14 @@ func (p *PublishedRepo) Publish(packagePool aptly.PackagePool, publishedStorageP
|
|||||||
indexes := newIndexFiles(publishedStorage, basePath, tempDir, suffix, p.AcquireByHash)
|
indexes := newIndexFiles(publishedStorage, basePath, tempDir, suffix, p.AcquireByHash)
|
||||||
|
|
||||||
legacyContentIndexes := map[string]*ContentsIndex{}
|
legacyContentIndexes := map[string]*ContentsIndex{}
|
||||||
|
var count int64
|
||||||
|
for _, list := range lists {
|
||||||
|
count = count + int64(list.Len())
|
||||||
|
}
|
||||||
|
|
||||||
|
if progress != nil {
|
||||||
|
progress.InitBar(count, false)
|
||||||
|
}
|
||||||
|
|
||||||
for component, list := range lists {
|
for component, list := range lists {
|
||||||
hadUdebs := false
|
hadUdebs := false
|
||||||
@@ -597,10 +605,6 @@ func (p *PublishedRepo) Publish(packagePool aptly.PackagePool, publishedStorageP
|
|||||||
indexes.PackageIndex(component, arch, false, false)
|
indexes.PackageIndex(component, arch, false, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
if progress != nil {
|
|
||||||
progress.InitBar(int64(list.Len()), false)
|
|
||||||
}
|
|
||||||
|
|
||||||
list.PrepareIndex()
|
list.PrepareIndex()
|
||||||
|
|
||||||
contentIndexes := map[string]*ContentsIndex{}
|
contentIndexes := map[string]*ContentsIndex{}
|
||||||
@@ -708,10 +712,6 @@ func (p *PublishedRepo) Publish(packagePool aptly.PackagePool, publishedStorageP
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if progress != nil {
|
|
||||||
progress.ShutdownBar()
|
|
||||||
}
|
|
||||||
|
|
||||||
udebs := []bool{false}
|
udebs := []bool{false}
|
||||||
if hadUdebs {
|
if hadUdebs {
|
||||||
udebs = append(udebs, true)
|
udebs = append(udebs, true)
|
||||||
@@ -771,6 +771,7 @@ func (p *PublishedRepo) Publish(packagePool aptly.PackagePool, publishedStorageP
|
|||||||
}
|
}
|
||||||
|
|
||||||
if progress != nil {
|
if progress != nil {
|
||||||
|
progress.ShutdownBar()
|
||||||
progress.Printf("Finalizing metadata files...\n")
|
progress.Printf("Finalizing metadata files...\n")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user