Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 134497 - rpm obsoletes not functioning
rpm obsoletes not functioning
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Paul Nasrat
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2004-10-03 22:55 EDT by Seth Vidal
Modified: 2007-11-30 17:10 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-04-19 14:47:10 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
working obsoletes rpm -Uvvh output from rhl9 (5.92 KB, text/plain)
2004-10-04 10:40 EDT, Seth Vidal
no flags Details
broken obsolete rpm -Uvvh output from fc2 (5.19 KB, text/plain)
2004-10-04 10:41 EDT, Seth Vidal
no flags Details

  None (edit)
Description Seth Vidal 2004-10-03 22:55:36 EDT
Description of problem:
rpm is not obsoleting packages.

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

How reproducible:
every time.

Steps to Reproduce:
1. Download i686 rpms from http://linux.duke.edu/~skvidal/broken/
2. rpm -ivh baz-0.1-1.i686.rpm
3. rpm -q baz
4. rpm -qp --obsoletes quux-0.1-1.i686.rpm
5. you'll note it obsoletes baz >= 0.1
6. rpm -Uvh quux-0.1-1.i686.rpm
7. rpm -q quux - it's installed
8. rpm -q baz - it's still installed too!

Actual results:
baz is still installed

Expected results:
baz should have been removed.

Additional info:
This gets EXTRA special wacky when you start dealing with biarch since
obsoletes do not specify arch. Also consider i686 being obsoleted by
Comment 1 Seth Vidal 2004-10-04 01:33:03 EDT
with these packages it appears to occur on fc1 and el3u3
Comment 2 Seth Vidal 2004-10-04 10:33:37 EDT
just tested on rhl9 - everything works there.
Comment 3 Seth Vidal 2004-10-04 10:40:21 EDT
Created attachment 104715 [details]
working obsoletes rpm -Uvvh output from rhl9
Comment 4 Seth Vidal 2004-10-04 10:41:30 EDT
Created attachment 104716 [details]
broken obsolete rpm -Uvvh output from fc2
Comment 5 Seth Vidal 2004-10-04 10:57:10 EDT
looks like if the version of the obsoleting package is not <= then it
will work correctly.

but if obspackage-evr is <=  installedpackage-evr then it won't remove
the other.

Comment 6 Paul Nasrat 2004-10-04 11:00:24 EDT
Relevant diff between RHL9 to HEAD, reversed on HEAD

--- depends.c   2003-03-03 22:12:00.000000000 +0000
+++ /export/anu/home/pauln/src/rpm/lib/depends.c        2004-04-01
13:56:54.000000000 +0100
@@ -305,7 +305,8 @@
            if (rpmdsEVR(obsoletes) == NULL
             || rpmdsAnyMatchesDep(oh, obsoletes, _rpmds_nopromote))
-               xx = removePackage(ts, oh, rpmdbGetIteratorOffset(mi),
+               if (rpmVersionCompare(h, oh))
+                   xx = removePackage(ts, oh,
rpmdbGetIteratorOffset(mi), pkgKey);
        mi = rpmdbFreeIterator(mi);
Comment 7 Jeff Johnson 2004-10-04 14:00:50 EDT
The added line prevents obsoleting package with identical NEVR.

This was important bug fix for major customer (I can tell from
when the fix went in), but for the life of me, I cannot remember the
problem report. Perhaps relocated packages, perhaps multilib.
Comment 8 Seth Vidal 2004-10-04 14:02:31 EDT
it also prevents obsoleting package identical EVR, not just NEVR
Comment 9 Jeff Johnson 2004-10-05 17:08:16 EDT
Fixed (by reverting the 1 line change) in rpm-4.3.2-9.
Comment 10 David Lehman 2004-12-02 18:07:26 EST
Can we get this fixed in RHEL-3 branch as well, please?
Comment 13 Jeremy Katz 2005-04-19 14:47:10 EDT
Closing due to inactivity.  If this issue still occurs with current releases,
please reopen and set the release in which you've encountered the problem.

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