Bug 462784 - checkSignals uses exit instead of sys.exit, thus. causing a traceback
Summary: checkSignals uses exit instead of sys.exit, thus. causing a traceback
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum
Version: 5.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: James Antill
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-09-18 21:05 UTC by James Antill
Modified: 2009-01-20 21:44 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-20 21:44:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:0176 0 normal SHIPPED_LIVE yum bug fix update 2009-01-20 16:05:43 UTC

Description James Antill 2008-09-18 21:05:54 UTC
Description of problem:
 Because of the way rpm eats C-c/SIGINT we have a checkSignals call in yum, which will exit if rpm tells us that a SIGINT occured. This bug means instead of exiting we'll traceback.

 However this is even more important in 5.3 because with:

rpm-4.4.2.3-4.el5.i386
yum-3.2.19-8.el5.noarch
yum-rhn-plugin-0.5.3-25.el5.noarch

...then we get a traceback if the user interupts a download with RHN, due to how RHN doesn't work the same as non RHN.

 The patch is literally:

diff --git a/rpmUtils/miscutils.py b/rpmUtils/miscutils.py
index 64e232e..e9fb3e5 100644
--- a/rpmUtils/miscutils.py
+++ b/rpmUtils/miscutils.py
@@ -413,5 +413,5 @@ def checkSignals():
                               signal.SIGPIPE,
                               signal.SIGQUIT,
                               signal.SIGHUP]):
-            exit(1)
+            sys.exit(1)

...and changes C-c from producing ~50 lines of traceback vs. just exiting.
 Another change needs to be done to rhn-plugin to produce a nice message as normal yum does, but that's a minor thing.

Comment 1 James Antill 2008-09-18 21:19:00 UTC
 Note that 5.2 rpm eats the C-c completely, so you need the latest rpm to test (and stopping with a traceback is better than not stopping, so it's not a regression as such).

Comment 2 RHEL Program Management 2008-09-18 21:33:08 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 3 James Antill 2008-09-18 21:54:05 UTC
 Ok, I realized I was testing with an old version of python ... with the latest python yum-rhn-plugin and yum works fine with downloads and C-c.
 So the above is a real edge case again.

Comment 9 errata-xmlrpc 2009-01-20 21:44:22 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0176.html


Note You need to log in before you can comment on or make changes to this bug.