Bug 998707

Summary: Yum depsolver doesn't compare versions of virtual provides
Product: Red Hat Enterprise Linux 7 Reporter: Stephen Gallagher <sgallagh>
Component: yumAssignee: James Antill <james.antill>
Status: CLOSED CURRENTRELEASE QA Contact: Karel Srot <ksrot>
Severity: high Docs Contact:
Priority: high    
Version: 7.0CC: james.antill, tsmetana, vcrhonek
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: yum-3.4.3-103.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1073406 (view as bug list) Environment:
Last Closed: 2014-06-13 11:01:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 922084    

Description Stephen Gallagher 2013-08-19 20:21:03 UTC
Description of problem:
When installing a package with a Requires: on a virtual provides, the version provided by the virtual provides: has no impact on the resolution and the depsolver ends up falling back on further techniques (such as fewest additional dependencies or shortest package name) to select the package to resolve.

Version-Release number of selected component (if applicable):
yum-3.4.3-101.el7

How reproducible:
Every time

Steps to Reproduce:
I discovered this today while debugging an issue with OpenLMI.

We added a virtual "Provides: cim-server" to the packages sblim-sfcb (giving cim-server a version of 0) and tog-pegasus (giving cim-server a version of 1).

The expectation is that installing "openlmi-providers" which "Requires: cim-server" would automatically select tog-pegasus, since it provided the highest version of cim-server (unless sblim-sfcb was also manually provided on the yum command-line).

Actual results:
The yum resolver skipped this version comparison and fell back on using the number of additional dependent packages (1 for Pegasus vs. 0 for SFCB) and selected SFCB instead.

Expected results:
When only "Requires: cim-server" is provided, we would expect it to select the higher version unless sblim-sfcb was already installed or provided on the command-line.

Additional info:
We want to encourage the use of Pegasus for OpenLMI over SFCB as it is more fully-featured. To this end, we have manually added versioning to the 'cim-server' virtual Provides:

I debugged this with James Antill today on IRC and he discovered the source of this bug and has provided a one-liner patch here: http://yum.baseurl.org/gitweb?p=yum.git;a=commitdiff;h=3eaca8456a9b8c4321a2d3facf6e1084853ef492

Please pull this patch into yum in RHEL 7.0

Comment 3 Ludek Smid 2014-06-13 11:01:33 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.