Bug 440159

Summary: [PATCH] provide better feedback when a package is replaced due to obsoletes.
Product: [Fedora] Fedora Reporter: Todd Zullinger <tmz>
Component: yumAssignee: Seth Vidal <skvidal>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: ffesti, james.antill, katzj, mefoster, pmatilai, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-14 20:21:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch to provide better feedback when a package is replaced due to obsoletes.
none
yum -d10 localinstall mod_jk*.rpm (without httpd installed)
none
yum -d10 localinstall mod_jk*.rpm (with httpd installed)
none
Installing openjdk with failure at end
none
Installing openjdk successfully (and incidentally removing icedtea) none

Description Todd Zullinger 2008-04-01 22:52:09 UTC
(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 22:52:09 UTC
Created attachment 299987 [details]
Patch to provide better feedback when a package is replaced due to obsoletes.

Comment 2 Todd Zullinger 2008-04-01 22:53:39 UTC
Created attachment 299989 [details]
yum -d10 localinstall mod_jk*.rpm (without httpd installed)

Comment 3 Todd Zullinger 2008-04-01 22:54:19 UTC
Created attachment 299990 [details]
yum -d10 localinstall mod_jk*.rpm (with httpd installed)

Comment 4 Mary Ellen Foster 2008-04-14 10:02:58 UTC
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 10:03:44 UTC
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 10:04:44 UTC
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 20:21:03 UTC
Todd, merged this patch upstream.
thanks.

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