Bug 139462

Summary: yum doesnt fail gracefully on early user cancel
Product: [Fedora] Fedora Reporter: Rahul Sundaram <rahulsundaram>
Component: yumAssignee: Jeremy Katz <katzj>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3CC: katzj
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-11-30 06:10:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Rahul Sundaram 2004-11-16 03:41:00 UTC
Description of problem:

I start a package installation through yum and cancel it immediately.
It fails with traceback

Version-Release number of selected component (if applicable):


How reproducible:

everytime

Steps to Reproduce:
1. yum install package. 
2. cancel using control+c immediately

  
Actual results:

yum -y gnome-panel
Traceback (most recent call last):
  File "/usr/bin/yum", line 6, in ?
    import yummain
  File "/usr/share/yum-cli/yummain.py", line 23, in ?
    import yum
  File "/usr/lib/python2.3/site-packages/yum/__init__.py", line 35, in ?
    import depsolve
  File "/usr/lib/python2.3/site-packages/yum/depsolve.py", line 30, in ?
    import packages
  File "/usr/lib/python2.3/site-packages/yum/packages.py", line 18, in ?
    import rpm
KeyboardInterrupt


Expected results:

output: exit on user cancel

Additional info:

It does this correctly if cancelled after a minute or so

Comment 1 Seth Vidal 2004-11-16 04:01:50 UTC
the main yum handler that captures the keyboard interrupt isn't loaded
at that time.

There's not much I can do.

Comment 2 Rahul Sundaram 2004-11-16 04:08:03 UTC
I have no idea on the actual code but perhaps trying to load the
keyboard handing module or something as early as possible might help

Comment 3 Seth Vidal 2004-11-30 06:10:05 UTC
I load it in /usr/bin/yum, now.

if you ctrl-c at that point it will try to catch it.

beyond that, not a lot I can do.

This is fixed in yum 2.1.12