[p2] Updating while keeping constraints satisfied [message #112239] |
Fri, 20 June 2008 06:55 |
Eclipse User |
|
|
|
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
|
|
|
|
Powered by
FUDForum. Page generated in 0.01872 seconds