Community
Participate
Working Groups
On linux x86_64, I downloaded a fresh 3.7M7 and extracted it to a writable directory. Start it and add the I-Build site http://download.eclipse.org/eclipse/updates/3.7-I-builds Check for updates An update 3.7.0.I20110505-0800 is available but can not be installed, the message says "Insufficient access privileges to apply this update." I have all the access I need to apply this update, everything is writable in the normal layout.
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.