Bug 1490855

Summary: dnf responds to ctrl+c during installation
Product: [Fedora] Fedora Reporter: Kamil Páral <kparal>
Component: dnfAssignee: Igor Gnatenko <ignatenko>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 26CC: dmach, ignatenko, jmracek, packaging-team-maint, rpm-software-management, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-09-20 11:14:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kamil Páral 2017-09-12 11:45:04 UTC
Description of problem:
I started "dnf update" command and then realized I wanted to change something. I quickly hit Ctrl+C wishing to interrupt it while downloading packages. I wasn't quick enough and dnf started installing before I pressed it. Three packages were updated in the meantime and then dnf responded to Ctrl+C and interrupted the operation. The result is that my system was immediately in inconsistent state - some packages were duplicated (newer package versions were installed but the older ones were not yet removed). I was able to deal with that but it could've been much worse. For example if I hit Ctrl+C, perhaps by accident, in the middle of the operation, when tens of operations were already performed.

Why does dnf respond to Ctrl+C during critical operations? It makes sense to respond to it during depsolving, downloading, etc. But I believe it should not handle the signal during installation.

Version-Release number of selected component (if applicable):
dnf-2.6.3-1.fc26.noarch

Comment 1 Daniel Mach 2017-09-20 11:13:44 UTC
When DNF starts RPM transaction, Ctrl+C should be disabled to ensure that the transaction finishes.

Comment 2 Igor Gnatenko 2017-09-20 11:14:50 UTC

*** This bug has been marked as a duplicate of bug 1425476 ***