Bug 527432 - Yum can not handle correctly obsolete of obsolete in one transaction
Summary: Yum can not handle correctly obsolete of obsolete in one transaction
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum
Version: 5.4
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Packaging Maintenance Team
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-10-06 12:12 UTC by Miroslav Suchý
Modified: 2014-01-21 06:15 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-04-30 09:00:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Miroslav Suchý 2009-10-06 12:12:02 UTC
Description of problem:
During preparation of RHBA-2009:8906-02 I find that yum could not correctly handle following situation:
We start with package 
 rhn-ssl-cert-check-1.4-10.7.el5.noarch
which is quite normal.
Then we have package :
 spacewalk-ssl-cert-check.noarch 1.7-1.el5sat
with following obsoletes and provides:
 Obsoletes: rhn-ssl-cert-check < %{version}
 Provides:  rhn-ssl-cert-check = %{version}

And finally package:
 rhn-ssl-cert-check-5.2-1.1.el5:1.noarch
with following obsoletes and provides:
 Obsoletes: spacewalk-ssl-cert-check < 1.8
 Provides:  spacewalk-ssl-cert-check = 1.8

Now let assume I have rhn-ssl-cert-check-1.4-10.7.el5.noarch installed.

If I have rhn-ssl-cert-check-1.4-10.7.el5.noarch and rhn-ssl-cert-check-5.2-1.1.el5:1.noarch in one repo, then yum upgrade correctly.
If I have rhn-ssl-cert-check-1.4-10.7.el5.noarch and spacewalk-ssl-cert-check.noarch 1.7-1.el5sat in one repo, then yum upgrade correctly.
BUT, if I have all three packages in one repo, then when I run "yum upgrade" yum will upgrade to spacewalk-ssl-cert-check. And if I immediately (i.e. no changes neither in repo nor on system) "yum upgrade" yum will upgrade to 
rhn-ssl-cert-check-5.2-1.1.el5:1.noarch.
I would assume that correct way is direct upgrade.

If I create package:
rhn-ssl-cert-check-5.2-1.1.el5:1.noarch
---------------------------------------------------------
Obsoletes: spacewalk-ssl-cert-check < 1.8
Provides:  spacewalk-ssl-cert-check = 1.8
Obsoletes: %{name} < %{version}
Provides:  %{name} = %{version}
Then yum will correctly upgrade from rhn-ssl-cert-check-1.4-10.7.el5.noarch to rhn-ssl-cert-check-5.2-1.1.el5:1.noarch without that intermediate step.

Version-Release number of selected component (if applicable):
# rpm -q yum
yum-3.2.22-20.el5

How reproducible:
deterministic

Steps to Reproduce:
1. create package foo-1.0
2. create package bar-1.1 with:
Obsoletes: foo < %{version}
Provides:  foo = %{version}
3. create package foo-2.0 with:
Obsoletes: bar < 1.2
Provides:  bar = 1.2
4. rpm -Uvh  foo-1.0.rpm
5. create repo from all three packages and point your system to that repo
6. yum upgrade
  
Actual results:
foo-1.0 is replaced with bar-1.1

Expected results:
foo-1.0 is replaced with foo-2.0

Additional info:

Comment 1 James Antill 2013-03-12 20:44:04 UTC
 Obsoletes chains/loops should have already been fixed in later RHEL-5 releases.


Note You need to log in before you can comment on or make changes to this bug.