Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340791 - Add property to prevent the SDK from being uninstalled
Summary: Add property to prevent the SDK from being uninstalled
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Releng (show other bugs)
Version: 3.7   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.7 M7   Edit
Assignee: Kim Moir CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 323887 342492 345723
Blocks:
  Show dependency tree
 
Reported: 2011-03-23 14:14 EDT by DJ Houghton CLA
Modified: 2011-05-13 08:18 EDT (History)
2 users (show)

See Also:


Attachments
last profile (322 bytes, application/octet-stream)
2011-04-11 15:02 EDT, Kim Moir CLA
no flags Details
previous profile (93.82 KB, application/octet-stream)
2011-04-11 15:03 EDT, Kim Moir CLA
no flags Details
patch (12.07 KB, patch)
2011-04-12 13:57 EDT, Kim Moir CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description DJ Houghton CLA 2011-03-23 14:14:32 EDT
Now that bug 323887 has been fixed, the releng build scripts should be modified so the Eclipse SDK feature is marked as "locked" and cannot be uninstalled.
Comment 1 Kim Moir CLA 2011-03-24 09:24:51 EDT
Will upgrade basebuilder with next I-build's bundles so I can release this change.
Comment 2 Kim Moir CLA 2011-04-11 14:40:40 EDT
DJ, I changed the way the director is called so the extraArgs include the iuProfileProperties path now

         <ant antfile="${eclipse.pdebuild.scripts}/genericTargets.xml" target="runDirector" inheritAll="true">
                        <property name="p2.repo" value="file:${p2.repo}" />
                        <property name="p2.director.iu" value="${p2.director.installIU}" />
                        <property name="p2.director.installPath" value="${p2.director.install.path}" />
                        <property name="os" value="${p2.os}" />
                        <property name="ws" value="${p2.ws}" />
                        <property name="arch" value="${p2.arch}" />
                        <property name="p2.director.log" value="${directorlog}" />
                        <property name="equinoxLauncherJar" value="${base.builder}/plugins/org.eclipse.equinox.launcher.jar" />
                        <property name="vmargs" value="-Dorg.eclipse.ecf.provider.filetransfer.retrieve.closeTimeout=3000 -Dorg.eclipse.ecf.provider.filetransfer.retrieve.readTimeout=3000"/>
                        <property name="p2.director.extraArgs" value="-profileProperties org.eclipse.update.install.features=true -iuProfileProperties ${equinox.build.configs}/equinox.prov/lock.properties" />
                </ant>

${equinox.build.configs}/equinox.prov/lock.properties looks like this
org.eclipse.sdk.feature.group.key.0=org.eclipse.equinox.p2.type.lock
org.eclipse.sdk.feature.group.value.0=1

However, I can still uninstall the SDK. Any ideas?
Comment 3 DJ Houghton CLA 2011-04-11 14:48:15 EDT
Can you attach the latest profile that is the result of the install? 
Thanks.
Comment 4 Kim Moir CLA 2011-04-11 15:02:13 EDT
Created attachment 192962 [details]
last profile
Comment 5 Kim Moir CLA 2011-04-11 15:03:01 EDT
Created attachment 192963 [details]
previous profile
Comment 6 DJ Houghton CLA 2011-04-11 15:15:23 EDT
Was this a valid build? Were there any error logs? The "last" profile is empty.
Comment 7 Kim Moir CLA 2011-04-11 15:35:36 EDT
Yes, it was a valid build.  The issue is that I shouldn't be able uninstall the SDK, but I can.  "Last profile" refers to the profile where I removed the SDK.  The "previous profile" refers to the initial profile from the build.
Comment 8 Kim Moir CLA 2011-04-11 17:18:30 EDT
DJ, Can you send me a profile where this property is defined?
Comment 9 DJ Houghton CLA 2011-04-11 17:32:02 EDT
The property needs to be set on the org.eclipse.sdk.ide IU like this:

org.eclipse.sdk.ide.key.0=org.eclipse.equinox.p2.type.lock
org.eclipse.sdk.ide.value.0=1

I'm debugging it now but I think there is a problem when there are multiple IUs with the same ID but different version. For instance, I can reproduce this by trying to install the SDK from the i-builds repo. I do a query to see if "org.eclipse.sdk.ide" is a valid IU and it is, but I think the director is trying to set the property on a different version than will be installed, so that's why it fails.

If you are installing from a repository with only a single version, it should work.
Comment 10 Kim Moir CLA 2011-04-11 17:36:02 EDT
Okay thanks DJ, I'll restart the director install with the new property and try installing from a single-child repo.
Comment 11 Kim Moir CLA 2011-04-12 13:57:53 EDT
Created attachment 193081 [details]
patch
Comment 12 Kim Moir CLA 2011-04-12 14:13:04 EDT
It works when there is a single child repo in the composite repo. Also, there was a typo in my build scripts yesterday. I'll close this for now and then update to the newer bundles next week to address bug 342492.