Hi Daniel,

thanks for reply.
Just for clarification. I do not assume the current behavior as a bug.
But I failed to find information regarding the objective function definition 
used.
So I raised the question here really out of curiosity.
Unfortunately the provided documentation link does not work for me. (404)

The reported Tycho problem should be fixed in Tycho anyway.
0.0.0 versions used in the feature.xml should be strictly resolved to the 
latest available version. 

Best regards, 
Eckart

On Behalf Of Daniel Le Berre
Sent: Mittwoch, 20. Juli 2011 15:44

Hi Eckart,

Thanks for the bug report. We will take a closer look at your particular case.

The way the objective function is defined in p2 is described here:
http://www.cril.univ-artois.fr/spip/publications/lash2010.pdf

The behavior you observe might be expectable.

Suppose that you have package x version 1 and x version 2

Version 1 has no dependencies and version 2 has dependencies on y z u and v.

Suppose we have a minimal penalty of 1 for installing a package (to avoid 
installing a non necessary package).

In that case, if the penalty for installing an "old" package for x1 is 4 for 
instance, then the solver prefers to install x1 for a penalty of 4 instead of 
x2 for a penalty of 5 (1 for each x2, y,,z, u, v).

Note that with a bigger penalty for old versions, we could still install x2.

I will check in your bug report if this is really what happens in your case.

Cheers,

Daniel
Le 20 juil. 2011 à 13:22, Langhuth, Eckart a écrit :

> Hi,
>  
> As requested I created a p2 bug for this issue
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=352560
>  
> Best regards,
> Eckart
>  
> From: [email protected] [mailto:[email protected]] On 
> Behalf Of Pascal Rapicault
> Sent: Montag, 18. Juli 2011 18:52
> To: P2 developer discussions
> Subject: Re: [p2-dev] Projector weight function
>  
> For a new install (which is the case in a tycho build), the intent is for the 
> resolver to return the highest version available.
> For addition on top of an install or update, the algorithm is a bit more 
> complex but should favour the highest version of the things being in the 
> transitive closure of what is being changed.
>  
> Could you please open a bug 
> (https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Equinox) with the 
> necessary IUs to recreate the problem.
>  
> Thx
>  
> On 2011-07-14, at 4:46 PM, Langhuth, Eckart wrote:
> 
> 
> Hi,
>  
> while investigating a problem resulting in bug
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=352081
> I stumbled over the behavior of 
> org.eclipse.equinox.internal.p2.director.Projector.
>  
> Out of curiosity. Is there a description of the weight function used to 
> determine a solution?
> In my example a feature includes a single plugin without a version 
> constraint. (0.0.0)
> The search scope contains two version of the required plugin.
> The solution provided by the projector contains the plugin with the smaller 
> version.
> My assumption would have been to prefer a solution with latest plugin version.
> The difference I see is that the higher version plugin defines more 
> dependencies.
> Is it intended to prefer a small installation over a new one?
>  
> Best regards,
> Eckart
> _______________________________________________
> p2-dev mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/p2-dev
>  
> _______________________________________________
> p2-dev mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/p2-dev

_______________________________________________
p2-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/p2-dev
_______________________________________________
p2-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/p2-dev

Reply via email to