Bug 486566

Summary: Yum obsoletes processing does not work when the obsoleting package is already installed
Product: [Fedora] Fedora Reporter: Nicolas Mailhot <nicolas.mailhot>
Component: yumAssignee: Seth Vidal <skvidal>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: ffesti, james.antill, pmatilai, tim.lauridsen
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-02-24 02:04:48 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:    
Bug Blocks: 446451    

Description Nicolas Mailhot 2009-02-20 11:10:04 UTC
Since rpm sadly allows the installation of an obsoleted package on a system that already includes the stuff obsoleting it (bug #486565), this situation needs to be handled by yum.

Unfortunately since the obsoleting package is already installed on system yum does not see the obsoleted package should be garbage collected and leaves it installed.

This should be fixed
yum-3.2.21-9.fc11.noarch

Comment 1 seth vidal 2009-02-20 13:25:18 UTC
How did the obsoleted pkg get installed?

Comment 2 Nicolas Mailhot 2009-02-22 18:12:28 UTC
This is bug #486565 rpm lets users install already obsoleted packages with rpm -Uvh without complaining at all

Comment 3 James Antill 2009-02-22 20:17:42 UTC
Last I checked it worked on each update Eg.

1. pkgA obsoletes pkgB
2a. pkgA installed
2b. thus. pkgB removed
3. pkgB installed (yum localinstall will do this as well as rpm)
4a. pkgA updates
4b. thus. pkgB removed again

...if you are suggesting that 4b should happen without 4a, then I have to disagree. Also if you want conflict+obsoletes then do conflict+obsoletes.

Comment 4 Nicolas Mailhot 2009-02-22 20:48:16 UTC
It works that way

1. pkgA obsoletes pkgB
2. pkgA installed
3. pkgB installed via rpm (user following an howto, package available on local disk, whatever)
4. yum update. yum sees pkgA installed, does not processes its obsolete info, and pkgB is never garbage collected
5. user complains his system is broken; investigation shows pkgB interferes with pkgA, and pkgA's maintainer relied on the package management tools to get rid of pkgB when pkgA is installed

Waitin for a pkgA update is no help as in can happen months/years later

Comment 5 James Antill 2009-02-24 02:04:48 UTC
Which is what I said.

If pkgA _conflicts_ with pkgB as well as obsoleting it, then the specfile should say that. If rpm is changed to "auto conflict" on obsolete, then we'll make changes to yum to conform to that new world view ... until then, NoB.