Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » [p2] Updating while keeping constraints satisfied
[p2] Updating while keeping constraints satisfied [message #112239] Fri, 20 June 2008 06:55 Go to next message
Eclipse UserFriend
Originally posted by: tim_fooy.inventivedesigners.com

Hi all,

Thanks for the previous help. I have managed to write a basic headless
update application using p2, by mimicing the update code that is present in
the UI code of p2. This boils down to the following simple algorithm:
- for every installed IU
- look for updates in the provided repository (IPlanner.updatesFor(X))
- if found, remove the current installed IU and install the new IU
- aggregate all these uninstall and install operations in one provisioning
plan, and let the engine execute it

This can successfully update the demo RCP Mail application.
However I am unsure about how much constraint checking occurs in this
process. Suppose the following situation:
- IU X requires some things and provides some other things.
- IPlanner.updatesFor(X) finds a newer version of X in the repository.
- the actions "delete X" and "install newer X" are inserted into the
provisioning plan.

But what if this newer X has a changed requirement list or provides less
than the current X? Would this prevent IPlanner.updatesFor(X) to return the
newer version? Would the engine performing the plan notice that installing
the new X would break the system if other existing plugins depended on stuff
provided by X that would now no longer be provided? Or would the system
indeed break because more manual checking is needed here?

I don't think this algorithm differs much from the one used in the p2 UI
code, so I am hoping that the engine takes care of this.

Could someone shed a light on this?

TIA,
Tim
Re: [p2] Updating while keeping constraints satisfied [message #113673 is a reply to message #112239] Wed, 09 July 2008 03:21 Go to previous message
Pascal Rapicault is currently offline Pascal RapicaultFriend
Messages: 333
Registered: July 2009
Location: Ottawa
Senior Member
> But what if this newer X has a changed requirement list or provides less
> than the current X? Would this prevent IPlanner.updatesFor(X) to return
> the newer version?
Yes. The updatesFor is dumb. At one point we had something fancy
checking the applicability but this was very costly and not precise since in
reality you may be looking for/install several updates at once.

>Would the engine performing the plan notice that installing the new X would
>break the system if other existing plugins depended on stuff provided by X
>that would now no longer be provided?
A complete dependency checking is done whenever you call
getProvisioningPlan()

HTH
Previous Topic:P2 and default metadata in eclipse/configuration folder in Eclipse releases
Next Topic:Equivalent of Update Policy for 3.4 & P2
Goto Forum:
  


Current Time: Fri Apr 19 04:32:45 GMT 2024

Powered by FUDForum. Page generated in 0.01872 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top