Opened 14 months ago

Closed 7 months ago

Last modified 7 months ago

#14603 closed bug (fixed)

[pkgman] download progress is broken in non-interactive mode

Reported by: diver Owned by: waddlesplash
Priority: normal Milestone: Unscheduled
Component: Applications/Command Line Tools Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All



pkgman either showsw green progress bar at the bottom of Terminal or something like this:

Now it shows this with no color background:
Continue? [yes/no] (yes) : yes
  0%100% vmware_addons-1.2.0-2-x86_64.hpkg [78.61 KiB]
Validating checksum for

Change History (7)

comment:1 by waddlesplash, 13 months ago

Still happening after the switch to NetApi for package kit downloads?

comment:2 by diver, 11 months ago

Just had it again in hrev52698.

comment:3 by diver, 10 months ago

Summary: [pkgman] download progress is broken sometimes[pkgman] download progress is broken in non-interactive mode

Ok, finally figured out. Progress is broken in non-interactive mode, e.g. when pkgman -y is used.

comment:4 by waddlesplash, 7 months ago

Resolution: fixed
Status: assignedclosed

Fixed in hrev53118.

comment:5 by nzimmermann, 7 months ago

Dear Augustin,

just noticed in that the new variable fShowProgress is not initialized in the constructor, which is bad practice in C++.

I did not check wheter this is true for the other variables, just spotted this and wanted to let you know.

Have a nice day, Niko

comment:6 by waddlesplash, 7 months ago

The variable is never used before it is initialized in ProgressPackageDownloadStarted. So it should be fine as-is.

comment:7 by nzimmermann, 7 months ago

Dear Augstin,

sure -- the logic is fine as-is at the moment, I did not claim it is a bug. Though, it is still bad practice, because if at a later stage code is added, that e.g. checks the fShowProgress state before it is set, uninitialized memory is read.

To avoid surprises, variables should always be initialized. Feel free to ignore it though, it is not crucial and you have for sure other things to take care of..

Have a nice day, Niko

Note: See TracTickets for help on using tickets.