Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cpackget] added: total number of files found in index.pidx #191

Merged
merged 1 commit into from
Jun 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion cmd/installer/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,14 @@ func DownloadPDSCFiles(skipInstalledPdscFiles bool, concurrency int, timeout int
}

pdscTags := Installation.PublicIndexXML.ListPdscTags()
if len(pdscTags) == 0 {
numPdsc := len(pdscTags)
if numPdsc == 0 {
log.Info("(no packs in public index)")
return nil
}

log.Infof("[J%d:F\"%s\"]", numPdsc, Installation.PublicIndex)

queue := concurrency
for _, pdscTag := range pdscTags {
if concurrency == 0 || len(pdscTags) <= concurrency {
Expand Down
1 change: 1 addition & 0 deletions cmd/utils/encodedProgress.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func (p *EncodedProgress) Write(bs []byte) (int, error) {
* T: Total bytes of file or numbers of files
* P: Currently processed percentage
* C: Currently processed bytes or numbers of files
* J: Total number of files beeing processed
*/
func (p *EncodedProgress) Print() {
newPercent := int(float64(p.current) / float64(p.total) * 100)
Expand Down