rpm-software-management / dnf5

Next-generation RPM package management system
Other
254 stars 86 forks source link

dnf transaction continues after receiving interrupt signal #1137

Open keszybz opened 10 months ago

keszybz commented 10 months ago

I was running dnf5 upgrade in a VM and pressed ^C to interrupt it:

$ sudo dnf5 upgrade
Updating and loading repositories:
 Fedora - Rawhide - Developmental packages for the next Fedora release                         100% |  39.9 KiB/s |  17.8 KiB |  00m00s
 RPM Fusion for Fedora Rawhide - Nonfree                                                       100% |  13.1 KiB/s |   7.4 KiB |  00m01s
 RPM Fusion for Fedora Rawhide - Free                                                          100% |  12.6 KiB/s |   7.1 KiB |  00m01s
 Fedora - Rawhide - Developmental packages for the next Fedora release                         100% |   1.3 MiB/s |   5.1 MiB |  00m04s
 RPM Fusion for Fedora Rawhide - Nonfree                                  100% [==================] |   0.0   B/s |   7.4 KiB | -00m00s RPM Fusion for Fedora Rawhide - Nonfree                                                       100% | 341.0   B/s |   7.4 KiB |  00m22s
>>> Librepo error: Librepo was interrupted by a signal
 RPM Fusion for Fedora Rawhide - Free                                                          ???% |   0.0   B/s |  -1.0   B |  ?     
>>> Librepo error: Cannot prepare internal mirrorlist: Interrupted by signal
Repositories loaded.
cProblem: cannot install both libheif-1.16.2-2.fc40.x86_64 and libheif-1.17.5-1.fc40.x86_64
  - package libheif-freeworld-1.16.2-2.fc40.x86_64 requires libheif(x86-64) = 1.16.2, but none of the providers can be installed
  - cannot install the best update candidate for package libheif-1.16.2-2.fc40.x86_64
  - problem with installed package 

Package                                                     Arch   Version                                     Repository          Size
Removing:                                                                                                                              
...
Removing dependent packages:                                                                                                           
...
Upgrading:                 
...
Is this ok [y/N]:                                                                                                    

I'm pretty sure that a signal needs to abort the whole process, not just cause a soft failure in one of the internal steps.

dnf5-5.1.8-1.fc40.x86_64

jan-kolarik commented 10 months ago

Hi, thanks for the report. I confirm this issue. Sometimes when pressing CTRL + C or sending SIGINT during the repositories loading, it really doesn't end up with terminating the dnf5 process.