diff --git a/deb/publish.go b/deb/publish.go index 410d3729..30673ac9 100644 --- a/deb/publish.go +++ b/deb/publish.go @@ -588,6 +588,14 @@ func (p *PublishedRepo) Publish(packagePool aptly.PackagePool, publishedStorageP indexes := newIndexFiles(publishedStorage, basePath, tempDir, suffix, p.AcquireByHash) 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 { hadUdebs := false @@ -597,10 +605,6 @@ func (p *PublishedRepo) Publish(packagePool aptly.PackagePool, publishedStorageP indexes.PackageIndex(component, arch, false, false) } - if progress != nil { - progress.InitBar(int64(list.Len()), false) - } - list.PrepareIndex() contentIndexes := map[string]*ContentsIndex{} @@ -708,10 +712,6 @@ func (p *PublishedRepo) Publish(packagePool aptly.PackagePool, publishedStorageP } } - if progress != nil { - progress.ShutdownBar() - } - udebs := []bool{false} if hadUdebs { udebs = append(udebs, true) @@ -771,6 +771,7 @@ func (p *PublishedRepo) Publish(packagePool aptly.PackagePool, publishedStorageP } if progress != nil { + progress.ShutdownBar() progress.Printf("Finalizing metadata files...\n") }