#14603 closed bug (fixed)
[pkgman] download progress is broken in non-interactive mode
Reported by: | diver | Owned by: | waddlesplash |
---|---|---|---|
Priority: | normal | Milestone: | R1/beta2 |
Component: | Applications/Command Line Tools | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
Beta1.
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 https://eu.hpkg.haiku-os.org/haikuports/master/x86_64/current/packages/vmware_addons-1.2.0-2-x86_64.hpkg...done.
Change History (8)
comment:1 by , 6 years ago
comment:3 by , 6 years 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:5 by , 6 years ago
Dear Augustin,
just noticed in https://git.haiku-os.org/haiku/commit/?id=45c3eb3a3c98041ab5543901a94cb511ff7fd1f6 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 , 6 years ago
The variable is never used before it is initialized in ProgressPackageDownloadStarted. So it should be fine as-is.
comment:7 by , 6 years 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
comment:8 by , 5 years ago
Milestone: | Unscheduled → R1/beta2 |
---|
Assign tickets with status=closed and resolution=fixed within the R1/beta2 development window to the R1/beta2 Milestone
Still happening after the switch to NetApi for package kit downloads?