mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-10-20 10:57:09 +00:00
Progress when downloading single files and when parsing remote mirrors.
This commit is contained in:
1 parent
04d6603f38
commit
74c88f3ef6
5 files changed
+37
No files matched your search
Vendored
+8
@@ -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