Bug 803735

Summary: Cannot install obsoleted package with --force
Product: Red Hat Enterprise Linux 7 Reporter: Miroslav Vadkerti <mvadkert>
Component: rpmAssignee: Panu Matilainen <pmatilai>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 7.0CC: ksrot
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-16 04:46:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
obsoleted rpm
none
obsoletes rpm none

Description Miroslav Vadkerti 2012-03-15 14:29:50 UTC
Description of problem:
I have two package, where one obsoletes the other one:
test-obsoleted-0.1-1.x86_64.rpm
test-obsoletes-0.1-1.x86_64.rpm

Everything seems to work nicely until I'm in need to install the obsoleted packages if I have also the obsoletes package installed:

# rpm -ivh test-obsoleted-0.1-1.x86_64.rpm 
Preparing...                ########################################### [100%]
   1:test-obsoleted         ########################################### [100%]
# rpm -Uvh test-obsoletes-0.1-1.x86_64.rpm 
Preparing...                ########################################### [100%]
   1:test-obsoletes         ########################################### [100%]
# rpm -Uvh test-obsoleted-0.1-1.x86_64.rpm 
error: Failed dependencies:
	test-obsoleted is obsoleted by (installed) test-obsoletes-0.1-1.x86_64
# rpm --force -Uvh test-obsoleted-0.1-1.x86_64.rpm 
error: Failed dependencies:
	test-obsoleted is obsoleted by (installed) test-obsoletes-0.1-1.x86_64
# rpm --force -ivh test-obsoleted-0.1-1.x86_64.rpm 
error: Failed dependencies:
	test-obsoleted is obsoleted by (installed) test-obsoletes-0.1-1.x86_64

As you can see I'm unable to install the obsoleted package even with --force.
This is a behavior change from RHEL6, where this was possible (but even without --force what might be a bug IMHO)

Version-Release number of selected component (if applicable):
rpm-4.9.1.2-1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. See description and use the attached rpms
  
Actual results:
Cannot install obsoleted packages with --force

Expected results:
IMHO Can install obsoleted packages with --force

Additional info:
Please note the behavior change from RHEL6

Comment 2 Miroslav Vadkerti 2012-03-15 14:39:34 UTC
Created attachment 570312 [details]
obsoleted rpm

Comment 3 Miroslav Vadkerti 2012-03-15 14:39:57 UTC
Created attachment 570313 [details]
obsoletes rpm

Comment 4 Panu Matilainen 2012-03-16 04:46:51 UTC
Consider this a new feature in rpm 4.9.x: the change of behavior is intentional but it's not something that is going to be backported to older releases.

--force is the wrong switch here, it does not help with dependency issues, only other things such as file conflicts. You need to use --nodeps to override the new obsoletes behavior. Not a bug, this one.