Bug 240611

Summary: yum not returning appropriate exit codes when listing packages
Product: Red Hat Enterprise Linux 5 Reporter: Guil Barros <gbarros>
Component: yumAssignee: James Antill <james.antill>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.0CC: jhutar, tao
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2008-0388 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-21 14:20:24 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:
Bug Depends On: 243769    
Bug Blocks: 429346    

Description Guil Barros 2007-05-18 19:21:26 UTC
Description of problem:
Yum returns zero when it fails a search, should return non-zero.

Version-Release number of selected component (if applicable):
yum-3.0.1-5.el5


Steps to Reproduce:
[root@njlxlabvmgfb01 ~]# yum list *ssh*
Installed Packages
openssh.i386                             4.3p2-16.el5           installed       
openssh-clients.i386                     4.3p2-16.el5           installed       
openssh-server.i386                      4.3p2-16.el5           installed       
Available Packages
openssh-askpass.i386                     4.3p2-16.el5           base            
[root@njlxlabvmgfb01 ~]# echo $?
0

[root@njlxlabvmgfb01 ~]# yum list blah
[root@njlxlabvmgfb01 ~]# echo $?
0


Expected results:
Exit code for a failed search should be non-zero

Comment 2 RHEL Program Management 2007-05-24 21:44:03 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 6 James Antill 2007-06-25 19:57:56 UTC
 Given that we want to fix this buy using yum-3.2.1 (I have a patch pending for
upstream), and yum-3.2.x breaks the rhn-plugin, I'm going to put a depends on
the fix for the rhn-plugin.


Comment 12 James Antill 2008-01-30 14:12:03 UTC
 This change is in the current RHEL-5.2 errata, I thought this BZ was included
as a clone due to the old errata usage. I'll check later today.


Comment 13 James Antill 2008-01-30 15:13:58 UTC
 This got cloned to: rhbz#429346 due to the first errata taking this bug, so it
couldn't be re-used.


Comment 16 errata-xmlrpc 2008-05-21 14:20:24 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 the 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-2008-0388.html


Comment 17 Chris Ward 2008-06-17 15:48:21 UTC
Reminder: This bug includes the 'RHTS' QA Whiteboard Keyword. Don't forget to add
'RHTSdone' to the QA Whiteboard along with a comment describing where the RHTS
test can be found once the RHTS test has been written. Otherwise, if an RHTS
will not be created, please remove RHTS from the qa whiteboard.