mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-01-11 03:11:50 +00:00
Progress when downloading single files and when parsing remote mirrors.
This commit is contained in:
8
debian/remote.go
vendored
8
debian/remote.go
vendored
@@ -342,6 +342,9 @@ func (repo *RemoteRepo) Download(progress aptly.Progress, d aptly.Downloader, pa
|
||||
}
|
||||
defer packagesFile.Close()
|
||||
|
||||
stat, _ := packagesFile.Stat()
|
||||
progress.InitBar(stat.Size(), true)
|
||||
|
||||
sreader := NewControlFileReader(packagesReader)
|
||||
|
||||
for {
|
||||
@@ -353,6 +356,9 @@ func (repo *RemoteRepo) Download(progress aptly.Progress, d aptly.Downloader, pa
|
||||
break
|
||||
}
|
||||
|
||||
off, _ := packagesFile.Seek(0, 1)
|
||||
progress.SetBar(int(off))
|
||||
|
||||
var p *Package
|
||||
|
||||
if kind == "binary" {
|
||||
@@ -373,6 +379,8 @@ func (repo *RemoteRepo) Download(progress aptly.Progress, d aptly.Downloader, pa
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
progress.ShutdownBar()
|
||||
}
|
||||
|
||||
progress.Printf("Building download queue...\n")
|
||||
|
||||
Reference in New Issue
Block a user