[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Fixing optimization function

TBH, I'm really surprised by the desired behavior (since basically it forces the user to explicitly install something that is already installed in order to have it be updated. In your particular example, the user would be stuck with A-1 until A-2 is installed or a constraint is requesting A-2), but at this point, the only thing that I can think of is for you to implement a new optimization function.

Unfortunately the pluggability of optimization function is not implemented and you will need to modify p2.

On 4/5/2017 10:30 AM, Alena Laskavaia wrote:

I am implementing software installer which is based on p2.
The problem is it has to be ultra conservative and looks like
I need to fix the current optimization function.

The was discussion about optimization function keeping installed items
if possible https://bugs.eclipse.org/bugs/show_bug.cgi?id=259537
but it ended up with in between approach which used transitive close, what
it does it actually ignores installed units if they are requires by something
else unless they are roots.

Example I have two units a and b, and b requires a (unversioned)
I have installed a-1 and b-1 (1 is version) (and group of a and b is the root).
Now I want to install b-2, so I should be able to just install b-2 and not a-2.
But currently it won't let me. It will attempt to pull a-2 as well.

I don't want to mark a-1 as root, but the only other way is to fix
optimization function,
but its in few layers in private function in Projector. Am I missing
something? Is there
any way to override it?
p2-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit