| Summary: | [reconciler] Optionally installed IU not removed when dependent IU is removed | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | DJ Houghton <dj.houghton> | ||||
| Component: | p2 | Assignee: | DJ Houghton <dj.houghton> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | irbull, john.arthorne, leberre, pascal, tjwatson | ||||
| Version: | 3.6 | ||||||
| Target Milestone: | 3.6 M7 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
DJ Houghton
Created attachment 162460 [details]
3.6 test case
This is a test case which exhibits the problem.
Adding Daniel to the CC as he may be interested in this case. I will take a look at that testcase ASAP. Here is the pseudo boolean problem sent to SAT4J. * #variable= 5 #constraint= 4 min: -9 AbstractVariable: 1108267618 -28 a 1.0.0 ; a 1.0.0 -> b 1.0.0 ; AbstractVariable: 1108267618 1269902161327 0.0.0.1269902161327 -> a 1.0.0 ; AbstractVariable: 1108267618 + AbstractVariable: 1528185295 <= 1 ; 1269902161327 0.0.0.1269902161327 -> AbstractVariable: 1108267618 OR AbstractVariable: 1528185295 ; There is no mention of B here. The problem lies either: 1) in the slicer that hides B to the solver. 2) in the profile change request that should consider that something that is no longer in the profile has been removed. 3) in the encoding of optionality :) I've released the (disabled) test case to HEAD. I have reviewed this test case and the behaviour you experience is the expected one (meaning that the test case as written is head is expected to fail). You have to remember that the removal as done through a PCR.remove expresses an intention and not a forced removal. This is consistent with what we do in the other cases where the uninstallation of a lower level IUs does not force the removal of the IUs depending on it (e.g. removing EMF does not force the removal of GMF). In this particular example, this means that even though you express the desire to have B removed, given that A depends on it and requires it, it will stay. Should you desire to force the removal of B (for example because B is no longer on disk in the case of a dropin), you would have to specify a "forced removal" by specifying a negated requirement on the profile change request. For example: IRequirement negateB = new RequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, b.getId(), new VersionRange(b.getVersion(), true, b.getVersion(), true), null, 0, 0, false); Collection<IRequirement> extraReqs = new ArrayList<IRequirement>(); extraReqs.add(negateB); changeRequest.addExtraRequirements(extraReqs); See also bug 270195. Ok, thanks for the hints. I will review the code and see what I can do about making the reconciler case work. Released code in the reconciler to add the forced remove for anything which has been moved. Added test case for this. Also updated and released the planner test case. Closing. |