Bug 440159 - [PATCH] provide better feedback when a package is replaced due to obsoletes.
[PATCH] provide better feedback when a package is replaced due to obsoletes.
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-01 18:52 EDT by Todd Zullinger
Modified: 2014-01-21 18:02 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-04-14 16:21:03 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)
Patch to provide better feedback when a package is replaced due to obsoletes. (964 bytes, patch)
2008-04-01 18:52 EDT, Todd Zullinger
no flags Details | Diff
yum -d10 localinstall mod_jk*.rpm (without httpd installed) (2.26 KB, application/octet-stream)
2008-04-01 18:53 EDT, Todd Zullinger
no flags Details
yum -d10 localinstall mod_jk*.rpm (with httpd installed) (2.26 KB, application/octet-stream)
2008-04-01 18:54 EDT, Todd Zullinger
no flags Details
Installing openjdk with failure at end (3.18 KB, text/plain)
2008-04-14 06:03 EDT, Mary Ellen Foster
no flags Details
Installing openjdk successfully (and incidentally removing icedtea) (3.34 KB, text/plain)
2008-04-14 06:04 EDT, Mary Ellen Foster
no flags Details

  None (edit)
Description Todd Zullinger 2008-04-01 18:52:09 EDT
(Caveat: this may be fixed in current yum.  Testing was done on CentOS 5)

When a package is obsoleted by another package, yum rightly replaces the package
requested with the one that obsoletes it.  However, it's not always clear that
it is doing so.  A warning (at whatever the appropriate debug level) would be nice.

As an example, on CentOS 5, I created a mod_jk package.  Attempting to install
this package leads yum to find that httpd has obsoleted mod_jk and httpd is then
installed instead.  But even with a very high debug level, yum provides no clue
that it is installing httpd due to it obsoleting mod_jk.

I'll attach the output of yum -d10 localinstall mod_jk*.rpm, with and without
httpd installed.  In both cases, it's not obvious that httpd is being installed
because it obsoletes mod_jk.  (It's perhaps more confusing since mod_jk Requires
httpd.)

Also attached is a patch against yum git HEAD.  I used a similar patch on the
yum-3.0.5 on CentOS to provide some feedback to the user when a package was
replaced due to an Obsoletes:.
Comment 1 Todd Zullinger 2008-04-01 18:52:09 EDT
Created attachment 299987 [details]
Patch to provide better feedback when a package is replaced due to obsoletes.
Comment 2 Todd Zullinger 2008-04-01 18:53:39 EDT
Created attachment 299989 [details]
yum -d10 localinstall mod_jk*.rpm (without httpd installed)
Comment 3 Todd Zullinger 2008-04-01 18:54:19 EDT
Created attachment 299990 [details]
yum -d10 localinstall mod_jk*.rpm (with httpd installed)
Comment 4 Mary Ellen Foster 2008-04-14 06:02:58 EDT
I just had some confusing issues, also I think driven by behind-the-scenes
processing of Obsoletes. I decided I wanted to install java-1.6.0-openjdk* from
Rawhide on my Fedora 8 machine (which already has java-1.7.0-icedtea*). Note
that java-1.6.0-openjdk Obsoletes java-1.7.0-icedtea < 0:1.7.0.0-0.999.

On the first attempt, it presented me with the list of packages to be installed,
asked if I wanted to do this, and then failed on rpm_check_debug because
"Package pl-jpl needs java-icedtea, this is not available." This is the only
time icedtea was mentioned in the whole transaction.

I removed pl-jpl and tried again. This time, the transaction went through, and
-- in addition to installing openjdk*, it also deleted icedtea*. But the
transaction summary doesn't reflect this.

I'll attach the console output from both of these transations shortly.
Comment 5 Mary Ellen Foster 2008-04-14 06:03:44 EDT
Created attachment 302322 [details]
Installing openjdk with failure at end

Note that the only mention of icedtea is in the error at the end.
Comment 6 Mary Ellen Foster 2008-04-14 06:04:44 EDT
Created attachment 302323 [details]
Installing openjdk successfully (and incidentally removing icedtea)

Especially notice the transaction summary at the end that doesn't mention the
erased packages.
Comment 7 Seth Vidal 2008-04-14 16:21:03 EDT
Todd, merged this patch upstream.
thanks.

Mary,
 Your problem is actually separate and filed under rpm. 

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