Bug 528746

Summary: Fix the return code for "yum reinstall"
Product: Red Hat Enterprise Linux 5 Reporter: James Antill <james.antill>
Component: yumAssignee: James Antill <james.antill>
Status: CLOSED ERRATA QA Contact: Petr Sklenar <psklenar>
Severity: medium Docs Contact:
Priority: low    
Version: 5.4CC: jhutar, psklenar
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: yum-3.2.22-23.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-30 04:30:06 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description James Antill 2009-10-13 10:55:37 EDT
Description of problem:
 This would be a backport of 512393, which is a one line fix.

 The way reinstall is done in rpm is that you remove the current version, and then install the exact same version. However rpm treats the install is an update, and so doesn't like the explicit remove (because then it thinks it's removing it twice).
 This causes a minor failure which rpm then reports to yum, and so yum exists with a "minor failure occured" exit code.

 The fix we did is to just remove the "remove operation" from the transaction when we add the install. This seems to work fine upstream/Fedora ... and is probably safe enough to include as a backport.
Comment 4 Petr Sklenar 2010-01-28 08:41:35 EST
adding qa keyword:
RHTSdone=/CoreOS/yum/Regression/bz528746-the-return-code-for-yum-reinstall
Comment 6 Petr Sklenar 2010-01-28 08:54:31 EST
(In reply to comment #4)
> adding qa keyword:
> RHTSdone=/CoreOS/yum/Regression/bz528746-the-return-code-for-yum-reinstall    

jobs with rhel54, failure
http://rhts.redhat.com/cgi-bin/rhts/jobs.cgi?id=121351

jobs with rhel55, passed
http://rhts.redhat.com/cgi-bin/rhts/jobs.cgi?id=121350
Comment 8 errata-xmlrpc 2010-03-30 04:30:06 EDT
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-2010-0254.html