Add publish output progress counting remaining number of packages

This commit is contained in:
Oliver Sauder
2018-05-17 15:44:49 +02:00
committed by Lorenzo Bolla
parent 3cd168c44d
commit f09a273ad7
15 changed files with 106 additions and 27 deletions
+1 -1
View File
@@ -391,7 +391,7 @@ func (files *indexFiles) ReleaseFile() *indexFile {
func (files *indexFiles) FinalizeAll(progress aptly.Progress, signer pgp.Signer) (err error) {
if progress != nil {
progress.InitBar(int64(len(files.indexes)), false)
progress.InitBar(int64(len(files.indexes)), false, aptly.BarPublishFinalizeIndexes)
defer progress.ShutdownBar()
}
+2 -2
View File
@@ -99,7 +99,7 @@ func NewPackageListFromRefList(reflist *PackageRefList, collection *PackageColle
result := NewPackageListWithDuplicates(false, reflist.Len())
if progress != nil {
progress.InitBar(int64(reflist.Len()), false)
progress.InitBar(int64(reflist.Len()), false, aptly.BarGeneralBuildPackageList)
}
err := reflist.ForEach(func(key []byte) error {
@@ -314,7 +314,7 @@ func (l *PackageList) VerifyDependencies(options int, architectures []string, so
missing := make([]Dependency, 0, 128)
if progress != nil {
progress.InitBar(int64(l.Len())*int64(len(architectures)), false)
progress.InitBar(int64(l.Len())*int64(len(architectures)), false, aptly.BarGeneralVerifyDependencies)
}
for _, arch := range architectures {
+1 -1
View File
@@ -594,7 +594,7 @@ func (p *PublishedRepo) Publish(packagePool aptly.PackagePool, publishedStorageP
}
if progress != nil {
progress.InitBar(count, false)
progress.InitBar(count, false, aptly.BarPublishGeneratePackageFiles)
}
for component, list := range lists {
+2 -2
View File
@@ -513,7 +513,7 @@ func (repo *RemoteRepo) DownloadPackageIndexes(progress aptly.Progress, d aptly.
if progress != nil {
stat, _ := packagesFile.Stat()
progress.InitBar(stat.Size(), true)
progress.InitBar(stat.Size(), true, aptly.BarMirrorUpdateBuildPackageList)
}
sreader := NewControlFileReader(packagesReader, false, isInstaller)
@@ -642,7 +642,7 @@ func (repo *RemoteRepo) FinalizeDownload(collectionFactory *CollectionFactory, p
repo.LastDownloadDate = time.Now()
if progress != nil {
progress.InitBar(int64(repo.packageList.Len()), false)
progress.InitBar(int64(repo.packageList.Len()), true, aptly.BarMirrorUpdateFinalizeDownload)
}
var i int