Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 313614

Summary: [planner] Need a way to express "expensiveness" of a solution
Product: [Eclipse Project] Equinox Reporter: Gunnar Wagenknecht <gunnar>
Component: p2Assignee: P2 Inbox <equinox.p2-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: aniefer, david_williams, leberre, pascal, tjwatson
Version: 3.6   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Gunnar Wagenknecht CLA 2010-05-19 15:40:58 EDT
As a result of bug 313502 (and other sightings) we need to find a way to express that one solution is *not* the preferred one when installing into an IDE.

In the particular case of bug 313502, an import package "org.apache.commons.logging" should install the "org.apache.commons.logging" bundle (and only that bundle) instead of the "org.slf4j.jcl" bundle plus all its dependencies. 

There are two reasons. 

(a) Most (all?) teams build and test with "org.apache.commons.logging".
(b) "org.slf4j.jcl" is considered an advanced option for system integrators that really want that particular logging api plus a binding/implementation of their choice.

A very simple "expensiveness" indicator could be "numbers of IUs to install".
Comment 1 Daniel Le Berre CLA 2010-05-19 16:04:19 EDT
p2 already minimizes the number of IUs to install, so if there are solutions with:

1) just org.apache.commons.logging
2) org.slf4j.jcl + one implementation 

then 1) should always be selected.
Comment 2 Gunnar Wagenknecht CLA 2010-05-20 02:27:32 EDT
According to the feedback I suspect "org.slf4j.api" was already installed on the systems. Otherwise, there is no logical explanation of why p2 picked "org.slf4j.jcl" to resolve the import package requirement.

Therefore, "numbers of IUs to install" would not help anymore and we really need a way to express that _this_ particular bundle should not be used if another solutions ranks higher.

Particularly, we must be able to express that one particular bundle is not as well tested as another particular bundle when installing things in the IDE. It's an option for target platforms but not for a runtime IDE because the IDE team never tested this combination.
Comment 3 Daniel Le Berre CLA 2010-05-20 02:43:12 EDT
The other explanation is that org.slf4j.api is required at some point by an IU, in which case the solver will provide it, no matter you prefer commons.logging to it.

In practice, it is not a big deal to express in the solver that some IUs are preferred to others (this is already what we do to retrieve the latest version of an IU).

The main issue here is to decide how to let the user express this in the metadata or the API.
Comment 4 Eclipse Webmaster CLA 2019-09-06 16:05:50 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.