#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:
Has a Patch: yes Platform: All

Description

Looks like pkgman leaves progress bar artifacts behind after hrev51501

Attachments (2)

screenshot.png (597.0 KB) - added by kallisti5 21 months ago.
screenshot9.png (120.8 KB) - added by taos 21 months ago.
Another visual glitch…

Download all attachments as: .zip

Change History (13)

Changed 21 months ago by kallisti5

Attachment: screenshot.png added

comment:1 Changed 21 months ago by kallisti5

Has a Patch: set

comment:2 Changed 21 months ago by waddlesplash

Owner: changed from nobody to waddlesplash
Status: newassigned

comment:3 Changed 21 months ago by waddlesplash

Hm, I wonder if this is caused by not flushing stdout before printf'ing the new line. Looks intermittent. Will try to reproduce...

Changed 21 months ago by taos

Attachment: screenshot9.png added

Another visual glitch...

comment:4 Changed 21 months ago by taos

And I can add another one:

Another visual glitch...

Here, every few hundred ms another new line is added instead of just updating the line with a longer progress bar. I'm using the x86_64 version.

comment:5 Changed 21 months ago by korli

The repositories checksums downloads appear also with 55 bytes each. No progress is needed for such sizes.

comment:6 Changed 21 months ago by waddlesplash

@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 Changed 21 months ago by korli

@waddlesplash actually before your change there was no progress or info on checksums, so I take that your change introduces this.

comment:8 Changed 21 months ago by pulkomandy

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 Changed 21 months ago by waddlesplash

@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 Changed 21 months ago by pulkomandy

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.

comment:11 Changed 21 months ago by waddlesplash

Resolution: fixed
Status: assignedclosed

Fixed in hrev51518.

Note: See TracTickets for help on using tickets.