Bug 1121538

Summary: Allow to specify priorities for the packages providing the same provide
Product: [Fedora] Fedora Reporter: Vít Ondruch <vondruch>
Component: rpmAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: ffesti, jzeleny, novyjindrich, packaging-team-maint, pnemade, rholy, rvokal, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-27 08:48:53 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:

Description Vít Ondruch 2014-07-21 07:38:44 UTC
It would be nice, if packages can be prioritized.

Let me explain. Currently the ruby executable is provided by rubypick package. This package requires ruby(runtime_executable) virtual provide, which is provided by both, ruby and jruby packages. And here's the rub. We would like to get ruby package installed if ruby(runtime_executable) provide is not satisfied on the system yet. But there is no way how to specify that and it quite often results in installation of jruby (something like bug 1120898). So I'd like to be able to provide some additional guide to dnf/yum/rpm, what should be the priorities, when several packages provide the same provide.

However, I am not sure if this information should be provided internally by RPM metadata, or if is should be provided by something like comps for example.

Comment 1 Ales Kozumplik 2014-07-21 13:50:49 UTC
The question is if there are any legit use cases for preferences over the same virtual provide: both the ruby runtimes should provide equivalent functionality. The solver picks one based on some reasonable criteria that are convenient for the user. The user gets functioning package he requested.

The precise semantics is another thing: suppose the solver is told to "prefer 'ruby'": what should it do in a transaction then if jruby means downloading one package while ruby means downloading one hundred of packages.

In any case: not something DNF has an ambition to solve. I'm moving this to RPM whose maintaienrs might want to consider it as an input for rich dependencies feature or maybe not.

Comment 2 Vít Ondruch 2014-07-21 14:05:07 UTC
Thanks Ales for considering.

Just one clarification, JRuby is currently the 'one hundred' packages case, when Ruby is the slimmer one. What are the other 'reasonable criteria' to install JRuby over Ruby is not that clear to me.

Comment 3 Jaroslav Reznik 2015-03-03 16:08:34 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 4 Florian Festi 2015-03-27 08:48:53 UTC
The Suggests: and Enhances: tags should allow doing this now.