Bug 526064

Summary: yum check-update ignores --obsoletes parameter
Product: Red Hat Enterprise Linux 5 Reporter: Trevor Hemsley <trevor.hemsley>
Component: yumAssignee: James Antill <james.antill>
Status: CLOSED ERRATA QA Contact: Petr Sklenar <psklenar>
Severity: medium Docs Contact:
Priority: low    
Version: 5.4CC: ajb, jhutar, psklenar
Target Milestone: rcKeywords: Reopened
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 08:30:02 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 Trevor Hemsley 2009-09-28 16:08:08 UTC
Description of problem:
yum check-update ignores the --obsoletes parameter or the obsoletes=1 yum.conf setting.


Version-Release number of selected component (if applicable):
yum-3.2.19-18.el5_3.1

How reproducible:
Every time if an obsoleted package is installed and a newer version is available


Steps to Reproduce:
1. Run yum check-update
2. Examine list of packages to be updated
3. Run yum update

  
Actual results:
Ooops, it includes packages now which obsolete packages that are already installed but were not listed in the check-update output

Expected results:
yum check-update should list packages that will be installed by yum update and not miss them out. i.e. check-update should be the equivalent of the old up2date --dry-run parameter

Additional info:
If /etc/yum.conf contains obsoletes=1 then check-update will give different results than update does. Check-update should be a way of finding out what will be updated on the system if you run a subsequent update and should also honour the --obsoletes switch or obsoletes=1 parameter.

Comment 1 James Antill 2009-09-28 16:49:34 UTC
"yum check-update --verbose" will list obsoletes packages, in the 5.4 version of yum (3.2.22-20) and the last part of the man page about check-update says:

    Running in  verbose  mode  also shows obsoletes.

The obsoletes flag is almost always on, so the cmd line option does nothing (see yum.conf which has obsoletes=1 in it).

Comment 2 Trevor Hemsley 2009-09-29 08:55:36 UTC
This is illogical behaviour and should be fixed. Check-update should do the same as update or there is no point in having it. Check-upate should respect teh same options that update does.

I am running 5.3 as my hosting provider has not rolled out 5.4 yet and man yum says nothing about this. 

What's the point in check-update using a different switch to obtain the same result.

Comment 3 James Antill 2009-09-29 21:13:04 UTC
Fair enough, I've made it output when obsoletes is on now. It'll be changed in 5.5.

Comment 4 Trevor Hemsley 2009-09-30 09:24:10 UTC
Great, I'll look forward to 5.5 then. Thanks.

Comment 8 Petr Sklenar 2010-01-27 17:33:01 UTC
adding qa-keywords:
RHTSdone=/CoreOS/yum/Regression/bz526064-yum-check-update-ignores-obsoletes-parameter

Comment 10 errata-xmlrpc 2010-03-30 08:30:02 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-2010-0254.html