Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download progressbar repeatedly prints new status on a new line #1957

Closed
BurningPho3nix opened this issue Dec 13, 2024 · 12 comments · Fixed by #1989
Closed

Download progressbar repeatedly prints new status on a new line #1957

BurningPho3nix opened this issue Dec 13, 2024 · 12 comments · Fixed by #1989
Assignees

Comments

@BurningPho3nix
Copy link

Hey,
this occured inside and outside of my program running "sudo dnf update -y --refresh"
Screencast_20241213_211013.webm

@kontura
Copy link
Contributor

kontura commented Dec 16, 2024

Can you share what version do you use and what terminal is that?

Can you reproduce it in a different terminal emulator?

@kontura kontura changed the title replication bug Download progressbar repeatedly prints new status on a new line Dec 16, 2024
@kontura kontura transferred this issue from rpm-software-management/dnf Dec 16, 2024
@BurningPho3nix
Copy link
Author

what terminal is that?

Cosmic Term

Can you reproduce it in a different terminal emulator?

Yes, Konsole as well

I'm on the newest dnf5 version as of that date

@kontura
Copy link
Contributor

kontura commented Dec 16, 2024

I tried with cosmic-term-1.0.0~alpha.4-1.fc42.x86_64 and dnf5-5.2.8.1-2.fc42.x86_64 and it is working as expected for me.

@BurningPho3nix
Copy link
Author

I tried on fc41, one epoch alpha ago.
The issue only appears when updating Chromium

@evan-goode
Copy link
Member

I also can't reproduce this on dnf5-5.2.8.1-2.fc41.x86_64 on Alacritty, Cosmic Term, foot, or Konsole when upgrading Chromium.

Curious, what's the result of

echo $TERM

@BurningPho3nix
Copy link
Author

BurningPho3nix commented Dec 21, 2024

Had it yesterday again, after cancelling the update process and starting it again.

But not on chromium...

@ashley-paul-12345
Copy link

Had it yesterday again, after cancelling the update process and starting it again.

But not on chromium...

This happened to me also awhile ago same as you as i was using mock, i cancelled while it was downloading the needed packages due to slow internet speed and when i tried again, it was like in your video

I am using kitty terminal and as i remember it was either dnf5-5.2.8.1-2.fc41.x86_64 or dnf5-5.2.8.0-2.fc41.x86_64

@BurningPho3nix
Copy link
Author

Had it yesterday again, after cancelling the update process and starting it again.

But not on chromium...

This happened to me also awhile ago same as you as i was using mock, i cancelled while it was downloading the needed packages due to slow internet speed and when i tried again, it was like in your video

I am using kitty terminal and as i remember it was either dnf5-5.2.8.1-2.fc41.x86_64 or dnf5-5.2.8.0-2.fc41.x86_64

Had the same issue with cancelling an update and restarting it just yesterday

@kontura
Copy link
Contributor

kontura commented Jan 6, 2025

I see, thank you, that is enough to reproduce it.

@kontura kontura self-assigned this Jan 6, 2025
@BurningPho3nix
Copy link
Author

@kontura can you give us a test package once you have a fix ready? maybe before the version fixing the issue gets published

kontura added a commit to kontura/dnf5 that referenced this issue Jan 7, 2025
This caused atleast two problems:
1. When the first package was local and its `end` callback was called
   immediately it updated and printed the MultiProgressBar which though
   that its finished (because it contained only one finished bar).
   This lead to an extra new line being printed which broke the output,
   reported here: rpm-software-management#1957
2. The numbering of bars was wrong, most noticeable with bigger
   transactions with some already downloaded packages. It could look
   like:
   ```
   Transaction Summary:
    Installing:       296 packages

   Total size of inbound packages is 414 MiB. Need to download 412 MiB.
   After this operation, 1 GiB extra will be used (install 1 GiB, remove 0 B).
   Is this ok [y/N]: y
   [1/1] libreoffice-1:24.8.4.2-2.fc41.x86_64                                                       100% |   0.0   B/s |   0.0   B |  00m00s
   >>> Already downloaded
   -----------------------------------------------------------------------------------------------------------------------------------------
   [1/2] libreoffice-base-1:24.8.4.2-2.fc41.x86_64                                                  100% |   0.0   B/s |   0.0   B |  00m00s
   >>> Already downloaded
   -----------------------------------------------------------------------------------------------------------------------------------------
   [1/4] libreoffice-draw-1:24.8.4.2-2.fc41.x86_64                                                  100% |   0.0   B/s |   0.0   B |  00m00s
   >>> Already downloaded
   -----------------------------------------------------------------------------------------------------------------------------------------
   [2/5] libreoffice-emailmerge-1:24.8.4.2-2.fc41.x86_64                                            100% |   0.0   B/s |   0.0   B |  00m00s
   >>> Already downloaded
   -----------------------------------------------------------------------------------------------------------------------------------------
   [3/6] libreoffice-impress-1:24.8.4.2-2.fc41.x86_64                                               100% |   0.0   B/s |   0.0   B |  00m00s
   >>> Already downloaded
   -----------------------------------------------------------------------------------------------------------------------------------------
   [4/7] libreoffice-math-1:24.8.4.2-2.fc41.x86_64                                                  100% |   0.0   B/s |   0.0   B |  00m00s
   >>> Already downloaded
   -----------------------------------------------------------------------------------------------------------------------------------------
   [  5/296] libreoffice-calc-1:24.8.4.2-2.fc41.x86_64                           0% [<=>               ] |   1.0   B/s |   0.0   B |  97d15h
   ```
@kontura
Copy link
Contributor

kontura commented Jan 7, 2025

@kontura can you give us a test package once you have a fix ready? maybe before the version fixing the issue gets published

There are builds in this COPR: https://copr.fedorainfracloud.org/coprs/packit/rpm-software-management-dnf5-1989.

It includes my patch from #1989.

@BurningPho3nix
Copy link
Author

@kontura can you give us a test package once you have a fix ready? maybe before the version fixing the issue gets published

There are builds in this COPR: https://copr.fedorainfracloud.org/coprs/packit/rpm-software-management-dnf5-1989.

It includes my patch from #1989.

works for me

kontura added a commit to kontura/dnf5 that referenced this issue Jan 8, 2025
This caused atleast two problems:
1. When the first package was local and its `end` callback was called
   immediately it updated and printed the MultiProgressBar which thought
   that its finished (because it contained only one finished bar).
   This lead to an extra new line being printed which broke the output,
   reported here: rpm-software-management#1957
2. The numbering of bars was wrong, most noticeable with bigger
   transactions with some already downloaded packages. It could look
   like:
   ```
   Transaction Summary:
    Installing:       296 packages

   Total size of inbound packages is 414 MiB. Need to download 412 MiB.
   After this operation, 1 GiB extra will be used (install 1 GiB, remove 0 B).
   Is this ok [y/N]: y
   [1/1] libreoffice-1:24.8.4.2-2.fc41.x86_64                                                       100% |   0.0   B/s |   0.0   B |  00m00s
   >>> Already downloaded
   -----------------------------------------------------------------------------------------------------------------------------------------
   [1/2] libreoffice-base-1:24.8.4.2-2.fc41.x86_64                                                  100% |   0.0   B/s |   0.0   B |  00m00s
   >>> Already downloaded
   -----------------------------------------------------------------------------------------------------------------------------------------
   [1/4] libreoffice-draw-1:24.8.4.2-2.fc41.x86_64                                                  100% |   0.0   B/s |   0.0   B |  00m00s
   >>> Already downloaded
   -----------------------------------------------------------------------------------------------------------------------------------------
   [2/5] libreoffice-emailmerge-1:24.8.4.2-2.fc41.x86_64                                            100% |   0.0   B/s |   0.0   B |  00m00s
   >>> Already downloaded
   -----------------------------------------------------------------------------------------------------------------------------------------
   [3/6] libreoffice-impress-1:24.8.4.2-2.fc41.x86_64                                               100% |   0.0   B/s |   0.0   B |  00m00s
   >>> Already downloaded
   -----------------------------------------------------------------------------------------------------------------------------------------
   [4/7] libreoffice-math-1:24.8.4.2-2.fc41.x86_64                                                  100% |   0.0   B/s |   0.0   B |  00m00s
   >>> Already downloaded
   -----------------------------------------------------------------------------------------------------------------------------------------
   [  5/296] libreoffice-calc-1:24.8.4.2-2.fc41.x86_64                           0% [<=>               ] |   1.0   B/s |   0.0   B |  97d15h
   ```
kontura added a commit to kontura/dnf5 that referenced this issue Jan 9, 2025
This caused atleast two problems:
1. When the first package was local and its `end` callback was called
   immediately it updated and printed the MultiProgressBar which though
   that its finished (because it contained only one finished bar).
   This lead to an extra new line being printed which broke the output,
   reported here: rpm-software-management#1957
2. The numbering of bars was wrong.
github-merge-queue bot pushed a commit that referenced this issue Jan 21, 2025
This caused atleast two problems:
1. When the first package was local and its `end` callback was called
   immediately it updated and printed the MultiProgressBar which thought
   that its finished (because it contained only one finished bar).
   This lead to an extra new line being printed which broke the output,
   reported here: #1957
2. The numbering of bars was wrong, most noticeable with bigger
   transactions with some already downloaded packages. It could look
   like:
   ```
   Transaction Summary:
    Installing:       296 packages

   Total size of inbound packages is 414 MiB. Need to download 412 MiB.
   After this operation, 1 GiB extra will be used (install 1 GiB, remove 0 B).
   Is this ok [y/N]: y
   [1/1] libreoffice-1:24.8.4.2-2.fc41.x86_64                                                       100% |   0.0   B/s |   0.0   B |  00m00s
   >>> Already downloaded
   -----------------------------------------------------------------------------------------------------------------------------------------
   [1/2] libreoffice-base-1:24.8.4.2-2.fc41.x86_64                                                  100% |   0.0   B/s |   0.0   B |  00m00s
   >>> Already downloaded
   -----------------------------------------------------------------------------------------------------------------------------------------
   [1/4] libreoffice-draw-1:24.8.4.2-2.fc41.x86_64                                                  100% |   0.0   B/s |   0.0   B |  00m00s
   >>> Already downloaded
   -----------------------------------------------------------------------------------------------------------------------------------------
   [2/5] libreoffice-emailmerge-1:24.8.4.2-2.fc41.x86_64                                            100% |   0.0   B/s |   0.0   B |  00m00s
   >>> Already downloaded
   -----------------------------------------------------------------------------------------------------------------------------------------
   [3/6] libreoffice-impress-1:24.8.4.2-2.fc41.x86_64                                               100% |   0.0   B/s |   0.0   B |  00m00s
   >>> Already downloaded
   -----------------------------------------------------------------------------------------------------------------------------------------
   [4/7] libreoffice-math-1:24.8.4.2-2.fc41.x86_64                                                  100% |   0.0   B/s |   0.0   B |  00m00s
   >>> Already downloaded
   -----------------------------------------------------------------------------------------------------------------------------------------
   [  5/296] libreoffice-calc-1:24.8.4.2-2.fc41.x86_64                           0% [<=>               ] |   1.0   B/s |   0.0   B |  97d15h
   ```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants