| Summary: | Setting IU properties for missing IUs in a profile dirties the profile but does not persist the property | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | Dean Roberts <dean.t.roberts> | ||||
| Component: | p2 | Assignee: | Pascal Rapicault <pascal> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | dean.t.roberts, dj.houghton, john.arthorne, pascal | ||||
| Version: | 3.7 | ||||||
| Target Milestone: | 3.7 M5 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 323888 | ||||||
| Attachments: |
|
||||||
|
Description
Dean Roberts
There may be many paths that would cause the planner to attempt to set properties on an IU that is not part of the profile. But here is one way to do it. 1) Have multiple versions of a singleton bundle in the drop-ins directory. 2) Restart so that the most relevant version of the bundle is installed. From this point on every time the UI is used to install a new bundle, the install will create two profiles. These two new profiles will differ only in timestamp. This happens since the ProfileSynchronizer will treat the non-installed versions of singletone bundle as additions. Specifically it will be trying to set properties on the non-installed IUs. I am leaning towards not allowing properties to be set on IUs which aren't part of the profile but we have to be careful how we enforce this. The operands might be executed in a different order (setProperty before installIU versus vice versa) so I don't know if we can just add a check in the #setProperty to first check to see if the IU is there. Currently we execute the operands in a specific order, but I don't believe that is spec'd. The planner code was incorrect as it was systematically creating an operand for the properties that were not part of the solution. I have released a fix and a test. Dean, the code didn't make it into the nightly build last night but you can still re-run your scenarios and see what profiles are created by grabbing last night's build and replacing the org.eclipse.equinox.p2.director JAR with one you export with code from HEAD. (changes are isolated to just this bundle) Btw, I'm just thinking that I have not checked what happens in the engine if there is no operands (array of length 0). We may need to add a check in Engine.perform(). We currently check to make sure the operands isn't null. Do you mean just adding a: if (operands.length == 0) return; to the beginning of the method? yep Created attachment 185553 [details]
patch
Patch to check and see if the operands are 0 length.
Patch released to HEAD. |