Opened 2 years ago

Closed 2 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:
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 2 years ago.
screenshot9.png (120.8 KB ) - added by taos 2 years ago.
Another visual glitch…

Download all attachments as: .zip

Change History (13)

by kallisti5, 2 years ago

Attachment: screenshot.png added

comment:1 by kallisti5, 2 years ago

Has a Patch: set

comment:2 by waddlesplash, 2 years ago

Owner: changed from nobody to waddlesplash
Status: newassigned

comment:3 by waddlesplash, 2 years ago

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

by taos, 2 years ago

Attachment: screenshot9.png added

Another visual glitch...

comment:4 by taos, 2 years ago

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 by korli, 2 years ago

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

comment:6 by waddlesplash, 2 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 korli, 2 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 pulkomandy, 2 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 waddlesplash, 2 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 pulkomandy, 2 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.

comment:11 by waddlesplash, 2 years ago

Resolution: fixed
Status: assignedclosed

Fixed in hrev51518.

Note: See TracTickets for help on using tickets.