RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 604080 - yum allows to install package obsoleted by installed package
Summary: yum allows to install package obsoleted by installed package
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum
Version: 6.0
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: James Antill
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
: 604622 (view as bug list)
Depends On:
Blocks: 582655
TreeView+ depends on / blocked
 
Reported: 2010-06-15 11:34 UTC by Šimon Lukašík
Modified: 2014-01-21 06:18 UTC (History)
1 user (show)

Fixed In Version: yum-3.2.27-12.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-15 14:53:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
test-obsoleted-0.1-1.i386.rpm (1.63 KB, application/octet-stream)
2010-06-15 11:35 UTC, Šimon Lukašík
no flags Details
test-obsoletes-0.1-1.i386.rpm (1.70 KB, application/octet-stream)
2010-06-15 11:35 UTC, Šimon Lukašík
no flags Details

Description Šimon Lukašík 2010-06-15 11:34:07 UTC
Description of problem:
Yum allows to install package that is obsoleted by currently installed package. Yum allows to install both even in single transaction.

Changelog of yum-3.2.24 says: 'Yum will now refuse to install a package that is obsoleted by a package that is currently installed.' ( http://yum.baseurl.org/wiki/whatsnew/3.2.24 )

Version-Release number of selected component (if applicable):
yum-3.2.27-9.el6.noarch

How reproducible:
always

Steps to Reproduce:
1. Take 2 packages (one obsoletes other)
test-obsoleted-0.1-1.i386.rpm
test-obsoletes-0.1-1.i386.rpm
2. rpm -qp --obsoletes test-obsoletes-0.1-1.i386.rpm
test-obsoleted
3. yum -y --nogpgcheck localinstall test-obsoletes-0.1-1.i386.rpm
4. yum -y --nogpgcheck localinstall test-obsoleted-0.1-1.i386.rpm
# Both installed
5. yum -y erase test-obsoleted test-obsoletes
6. yum -y --nogpgcheck localinstall test-obsolete*
# Both installed

Actual results:
both packages installed

Expected results:
don't install 

Additional info:

Comment 1 Šimon Lukašík 2010-06-15 11:35:07 UTC
Created attachment 424125 [details]
test-obsoleted-0.1-1.i386.rpm

p = rpmfluff.SimpleRpmBuild('test-obsoleted', '0.1', '1')
p.make()

Comment 2 Šimon Lukašík 2010-06-15 11:35:35 UTC
Created attachment 424126 [details]
test-obsoletes-0.1-1.i386.rpm

p = rpmfluff.SimpleRpmBuild("test-obsoletes", '0.1', '1')
p.add_obsoletes('test-obsoleted')
p.make()

Comment 4 RHEL Program Management 2010-06-15 11:53:20 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 5 James Antill 2010-06-15 14:56:38 UTC
Is it possible that you have a yum.conf without obsoletes=true set?

Because here I get:


% rpm -q gnome-packagekit --obsoletes
pirut < 1.3.31-2
% sudo yum localinstall /tmp/pirut-1.3.28-17.el5.noarch.rpm 
Setting up Local Package Process
Examining /tmp/pirut-1.3.28-17.el5.noarch.rpm: pirut-1.3.28-17.el5.noarch
Marking /tmp/pirut-1.3.28-17.el5.noarch.rpm to be installed
Nothing to do
% sudo yum in /tmp/pirut-1.3.28-17.el5.noarch.rpm --setopt=obsoletes=false
Setting up Install Process
Examining /tmp/pirut-1.3.28-17.el5.noarch.rpm: pirut-1.3.28-17.el5.noarch
Marking /tmp/pirut-1.3.28-17.el5.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package pirut.noarch 0:1.3.28-17.el5 set to be installed
--> Processing Dependency: python(abi) = 2.4 for package: pirut-1.3.28-17.el5.noarch
[...]

Comment 6 James Antill 2010-06-15 14:59:47 UTC
With the latest yum-utils installed you can do:


% yum-config-manager main | fgrep obs
obsoletes = True

Comment 7 seth vidal 2010-06-15 15:01:55 UTC
not just unset - but actually set to 0/False/no

b/c the default is True.

Comment 8 Šimon Lukašík 2010-06-15 15:53:15 UTC
Yes, I've got obsoletes option enabled.

# yum-config-manager main | fgrep obs
obsoletes = True

With reproducer in comment 5: I've got same correct behaviour = package pirut is obsoleted (and not installed)

Could it be related to that I've used these very simple packages test-obsolete* ? May I help somehow?

Comment 9 seth vidal 2010-06-15 16:12:12 UTC
Here's what I've seen:

if the obsoleted pkg is obsoleted by something in a repository- then yum gets the localinstall right and will not install the obsoleted pkg but tries to install the obsoleting pkg

if the obsoleted pkg is obsoleted by something that is already installed but NOT in a repo anywhere, yum doesn't get it right - it can't seem to see the obsoletes in the rpmdb and NOT in the pkgsack anywhere.

I'll look for the bug there.

Comment 10 James Antill 2010-06-15 16:34:15 UTC
n/m ... if I do:


% sudo yum --disablerepo='*' localinstall /tmp/pirut-1.3.28-17.el5.noarch.rpm 

...then it tries to install pirut.

Comment 11 seth vidal 2010-06-15 17:42:33 UTC
I just sent a patch upstream to fix this.

Comment 12 James Antill 2010-06-16 14:48:54 UTC
*** Bug 604622 has been marked as a duplicate of this bug. ***

Comment 14 releng-rhel@redhat.com 2010-11-15 14:53:01 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.


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