| Summary: | Unable to update fresh M7 install | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | Andrew Niefer <aniefer> | ||||
| Component: | p2 | Assignee: | P2 Inbox <equinox.p2-inbox> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | blocker | ||||||
| Priority: | P3 | CC: | david_williams, dean.t.roberts, kim.moir, Olivier_Thomann, pwebster | ||||
| Version: | 3.7 | Flags: | aniefer:
review+
|
||||
| Target Milestone: | 3.7 RC1 | ||||||
| Hardware: | PC | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Andrew Niefer
In the M7 download, before it is even run, the latest profile contains the following:
<iuProperties id='org.eclipse.sdk.ide' version='3.7.0.I20110428-0848'>
<properties size='3'>
<property name='org.eclipse.equinox.p2.internal.inclusion.rules' value='STRICT'/>
<property name='org.eclipse.equinox.p2.type.lock' value='1'/>
<property name='org.eclipse.equinox.p2.type.root' value='true'/>
</properties>
</iuProperties>
If I remove the org.eclipse.equinox.p2.type.lock property before running, then I can update the install.
Actually, looking at IProfile#LOCK_UNINSTALL = 1 << 0; IProfile#LOCK_UPDATE = 1 << 1; the profile property is fine, it is locked from uninstall. The code AvailableUpdateElement#init is incorrect, it is only checking that the IProfile#PROP_PROFILE_LOCKED_IU property exists. It should probably be checking that it equals IProfile#LOCK_UPDATE This is a problem for all platforms. The uninstall property was introduced with bug 340791 Created attachment 194955 [details] Fix This was caused by a bug I introduced when implementing bug 344977. I was testing for any lock. In fact, I should only test for an update lock, not an uninstall lock. This only surfaced recently when uninstall locks where added to the SDK profiles. I have released the patch with a small modification to catch NumberFormatException. To test, I took a fresh M7. Attempted to do the update and got the error. Then I took p2.ui and applied the patch and exported into host. After restart I tried the update again and it succeeded. In case anyone wants to workaround it manually, go to: eclipse\p2\org.eclipse.equinox.p2.engine\profileRegistry\SDKProfile.profile - Edit the most recent profile file - Find the section in comment #1 - Remove the line: <property name='org.eclipse.equinox.p2.type.lock' value='1'/> - Now start Eclipse and update it (In reply to comment #6) > In case anyone wants to workaround it manually, go to: > > eclipse\p2\org.eclipse.equinox.p2.engine\profileRegistry\SDKProfile.profile > > - Edit the most recent profile file > - Find the section in comment #1 > - Remove the line: > > <property name='org.eclipse.equinox.p2.type.lock' value='1'/> > > - Now start Eclipse and update it I think you also have to adjust the: <properties size='3'> to: <properties size='2'> This doesn't seem to be an issue with 4.1 I-build. The problem described in comment #4 exists in the 4.1 SDK, but 4.1 does not contain the uninstall lock introduced by bug 340791 so you are not prevented from updating. Verified that I could update the SDK from I20110507-0800 to I20110509-1200. |