Opened 7 years ago
Closed 7 years ago
#13750 closed bug (fixed)
pkgman progress bar artifacts in terminal
Reported by: | kallisti5 | Owned by: | waddlesplash |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Applications | Version: | R1/Development |
Keywords: | pkgman | Cc: | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
Looks like pkgman leaves progress bar artifacts behind after hrev51501
Attachments (2)
Change History (13)
by , 7 years ago
Attachment: | screenshot.png added |
---|
comment:1 by , 7 years ago
patch: | 0 → 1 |
---|
comment:2 by , 7 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 7 years ago
comment:4 by , 7 years ago
comment:5 by , 7 years ago
The repositories checksums downloads appear also with 55 bytes each. No progress is needed for such sizes.
comment:6 by , 7 years ago
@korli: Package Kit informs pkgman of download progress for checksums in the same way it notifies for package downloads, so this is something that should probably be changed in PackageKit.
@taos: that one looks unrelated to kallisti5's one, and has a much simpler fix I think.
comment:7 by , 7 years ago
@waddlesplash actually before your change there was no progress or info on checksums, so I take that your change introduces this.
comment:8 by , 7 years ago
When I made the progress bar I was careful to stay under 80 columns to avoid taos' problem. If there is a linebreak in the middle of the bar, things can go wrong (and will look ugly anyway).
Let's keep the filename in the line above the bar instead?
comment:9 by , 7 years ago
@korli: in the previous version, the progress bar was erased after the download completed, which is why it didn't appear on checksums (went by too fast.)
@PulkoMandy: I was intending to abbreviate the package name when this occurs. And there is no line "above" now, as all of that info has been combined into the single line with the progress info.
comment:10 by , 7 years ago
That's what I'm complaining about. We should keep a single line with the package name (which stays after the download is complete) and have only the progress/size/speed reports with/inside the progress bar.
This allows to keep things simple, because if you want a "when this happens" you will need to detect the terminal window size, then listen to resize events which go through the SIGWINCH signal, and this code will become a lot more complex. I feel this is not needed.
Hm, I wonder if this is caused by not flushing stdout before printf'ing the new line. Looks intermittent. Will try to reproduce...