Bug 116299 - "Obsoletes" causes conflicts with 2 identical EVR's
"Obsoletes" causes conflicts with 2 identical EVR's
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
2
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Jeff Johnson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-02-19 16:01 EST by Fernando Lopez-Lezcano
Modified: 2007-11-30 17:10 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-06 23:43:09 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
source and binary packages that can be used to reproduce the problem (252.52 KB, application/octet-stream)
2004-02-19 16:08 EST, Fernando Lopez-Lezcano
no flags Details
Spec #1: foo (411 bytes, text/plain)
2004-06-11 12:16 EDT, Ville Skyttä
no flags Details
Spec #2: bar (obsoletes foo) (431 bytes, text/plain)
2004-06-11 12:17 EDT, Ville Skyttä
no flags Details

  None (edit)
Description Fernando Lopez-Lezcano 2004-02-19 16:01:34 EST
Description of problem:

Goal: change the naming of a package. 
Original package has "ladspa-sdk" as its name.
New package has "ladspa" as its name. 
New package contains an "Obsoletes: ladspa-sdk" line in its
spec file. 
Installing (rpm -Uvh) "ladspa" over an already installed "ladspa-sdk"
generates an error that complains about conflicting files instead of
replacing the obsoleted package. 

Version-Release number of selected component (if applicable):
rpm-4.2.1-0.30

How reproducible:
Always

Steps to Reproduce:
1. build the "ladspa-sdk" rpms
2. rpm -Uvh ladspa-sdk-xxxx ladspa-sdk-example-plugins-xxxx
3. build the "ladspa" rpms
4. rpm -Uvh ladspa-xxxx ladspa-devel-xxxx (should obsolete ladspa-sdk
and ladspa-sdk-example-plugins)

    

Actual Results:  

# rpm -q ladspa-sdk
ladspa-sdk-1.12-1.rhfc1.ccrma
# rpm -q ladspa-sdk-example-plugins
ladspa-sdk-example-plugins-1.12-1.rhfc1.ccrma
 
Just to check that the package actually obsoletes:

# rpm -q --obsoletes -p ladspa-1.12-1.rhfc1.ccrma.i386.rpm ladspa-sdk
ladspa-sdk-example-plugins
# rpm -q --obsoletes -p ladspa-devel-1.12-1.rhfc1.ccrma.i386.rpm
(none)

What happens when I try to install:

# rpm -Uvh ladspa-1.12-1.rhfc1.ccrma.i386.rpm
ladspa-devel-1.12-1.rhfc1.ccrma.i386.rpm
Preparing...                ###########################################
[100%]
        file /usr/bin/analyseplugin from install of
ladspa-1.12-1.rhfc1.ccrma conflicts with file from package
ladspa-sdk-1.12-1.rhfc1.ccrma
        file /usr/bin/applyplugin from install of
ladspa-1.12-1.rhfc1.ccrma conflicts with file from package
ladspa-sdk-1.12-1.rhfc1.ccrma
        file /usr/lib/ladspa/amp.so from install of
ladspa-1.12-1.rhfc1.ccrma conflicts with file from package
ladspa-sdk-example-plugins-1.12-1.rhfc1.ccrma
        file /usr/lib/ladspa/delay.so from install of
ladspa-1.12-1.rhfc1.ccrma
conflicts with file from package
ladspa-sdk-example-plugins-1.12-1.rhfc1.ccrma
        file /usr/lib/ladspa/filter.so from install of
ladspa-1.12-1.rhfc1.ccrma conflicts with file from package
ladspa-sdk-example-plugins-1.12-1.rhfc1.ccrma
        file /usr/lib/ladspa/noise.so from install of
ladspa-1.12-1.rhfc1.ccrma
conflicts with file from package
ladspa-sdk-example-plugins-1.12-1.rhfc1.ccrma
        file /usr/lib/ladspa/sine.so from install of
ladspa-1.12-1.rhfc1.ccrma conflicts with file from package
ladspa-sdk-example-plugins-1.12-1.rhfc1.ccrma


Expected Results:  rpm should install ladspa and ladspa-devel and
replace ladpsa-sdk and ladspa-sdk-example-plugins

Additional info:

The exact same packages, when built under RedHat 7.3, 8.0 and 9 behave
as expected (that is, rpm -Uvh successfully installs the new packages
and replaces the old ones). This is a change in behavior of rpm under
Fedora Core 1. So far I have found _no_ way to successfully obsolete a
package under FC1. The behavior has been confirmed by an independent
person with a different install (ie: it does not appear like my
particular FC1 install is broken).
Comment 1 Fernando Lopez-Lezcano 2004-02-19 16:08:07 EST
Created attachment 97844 [details]
source and binary packages that can be used to reproduce the problem
Comment 2 Axel Thimm 2004-02-20 05:16:31 EST
I can verify this by installing only ladspa-sdk and trying to upgrade
to ladspa (i.e. ladspa-sdk-example-plugins is not needed to hit the bug).
Comment 3 Fernando Lopez-Lezcano 2004-02-25 15:08:11 EST
Please see comments at the end of:
  http://bugzilla.atrpms.net/show_bug.cgi?id=15
for more weird behavior and a more bounded set of conditions for
triggering the bug. In a nutshell, if the binaries inside both
packages (ladspa-sdk and ladspa, which obsoletes ladspa-sdk) are
_exactly_ the same the upgrade succeeds. If the binaries are different
then the bug is triggered and the upgrade fails. 

If a package B obsoletes package A, why would package B's upgrade care
about A's binaries?? They are obsolete by definition, they should be
replaced always. It would seem that the detection of conflicts is
happening at the wrong time (before rpm realizes that one package
obsoletes the other). 
Comment 4 Ville Skyttä 2004-06-11 12:15:50 EDT
This is still broken as of FC2, rpm-4.3.1-0.3.

I believe the analysis in comment 3 is not relevant here, as conflicts
never happen between any packages anyway if the installed files are
identical.

I dug more into this, and found that the conflicts only happen if the
EVR's of the old and the new packages are exactly the same.  Even the
slightest difference, for example changing no-epoch to "Epoch: 0"
(which should be equivalent, no? :) will cause the Obsoletes to work
as expected here.

I'll attach two minimal specfiles.
- Build both, install foo, try to upgrade to bar -> conflicts.
- Change *anything* in bar's EVR (increase, decrease, add epoch: 0),
  rebuild it, try upgrading again -> no conflicts, works.
Comment 5 Ville Skyttä 2004-06-11 12:16:49 EDT
Created attachment 101063 [details]
Spec #1: foo
Comment 6 Ville Skyttä 2004-06-11 12:17:40 EDT
Created attachment 101064 [details]
Spec #2: bar (obsoletes foo)
Comment 7 Jeff Johnson 2004-10-06 23:43:09 EDT
This is probably fixed (by reverting a change that
prevented obsoleting identical EVR) in rpm-4.3.2-9.

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