Bug 462784 - checkSignals uses exit instead of sys.exit, thus. causing a traceback
checkSignals uses exit instead of sys.exit, thus. causing a traceback
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum (Show other bugs)
5.3
All Linux
medium Severity medium
: rc
: ---
Assigned To: James Antill
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-18 17:05 EDT by James Antill
Modified: 2009-01-20 16:44 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-20 16:44:22 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description James Antill 2008-09-18 17:05:54 EDT
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 17:19:00 EDT
 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 Product and Program Management 2008-09-18 17:33:08 EDT
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 17:54:05 EDT
 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 16:44:22 EST
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.