|
|
Re: Update to remove a feature [message #1821433 is a reply to message #1821201] |
Thu, 13 February 2020 01:52 |
Chris Lake Messages: 25 Registered: November 2015 |
Junior Member |
|
|
So the product is based off the RCP/RAP Eclipse package. Essentially rebuilding it using the features I can see it comes with. Then we add several more features and plugins for our development purposes.
The current working Eclipse 2019-03 environment starts as:
<product name="eclipse.development.ide"
label="Development IDE">
<version
name="latest"
label="Eclipse IDE for RCP Development"
requiredJavaVersion="1.8">
<setupTask
xsi:type="setup.p2:P2Task"
label="Development IDE (Latest)"
licenseConfirmationDisabled="true">
<!-- base -->
<requirement
name="org.eclipse.epp.package.rcp.feature.feature.group"
versionRange="[4.11.0,4.11.1)"/>
<requirement
name="org.eclipse.epp.package.common.feature.feature.group"
versionRange="[4.11.0,4.11.1)"/>
<requirement
name="org.eclipse.sdk.feature.group"
versionRange="[4.11.0,4.11.1)"/>
...
<!-- supplemental -->
<requirement
name="org.eclipse.cdt.launch.remote.feature.group"
versionRange="[9.7.0,9.7.1)"/>
...
and so on
So although "epp.package.rcp" requires "org.eclipse.epp.package.common.feature.feature.group", we don't use that top level "epp.package.rcp" IU. So now I am attempting the following for 2019-09:
<product name="eclipse.development.ide"
label="Development IDE">
<version
name="latest"
label="Eclipse IDE for RCP Development"
requiredJavaVersion="1.8">
<setupTask
xsi:type="setup.p2:P2Task"
label="Development IDE (Latest)"
licenseConfirmationDisabled="true">
<!-- base -->
<requirement
name="org.eclipse.epp.package.rcp.feature.feature.group"
versionRange="[4.13.0,4.13.1)"/>
<!-- org.eclipse.epp.package.common.feature includes these 3 IUs
* org.eclipse.epp.logging.aeri.feature.feature.group
* org.eclipse.oomph.setup.feature.group
* org.eclipse.epp.package.common
They are installed individually because the 'aeri.feature' is not wanted
-->
<requirement
name="org.eclipse.oomph.setup.feature.group"
versionRange="[1.14.0,1.14.1)"/>
<requirement
name="org.eclipse.epp.package.common"
versionRange="[4.13.0,4.13.1)"/>
<requirement
name="org.eclipse.sdk.feature.group"
versionRange="[4.13.0,4.13.1)"/>
...
<!-- supplemental -->
<requirement
name="org.eclipse.cdt.launch.remote.feature.group"
versionRange="[9.9.0,9.9.1)"/>
...
and so on
So now that the feature is gone, I want it removed from devs Eclipse instance.
Note that in testing, I manually removed that feature then performed the update and this worked perfectly.
|
|
|
Re: Update to remove a feature [message #1821436 is a reply to message #1821433] |
Thu, 13 February 2020 03:51 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
The issue is that when the p2 task performs as a profile change request (in org.eclipse.oomph.p2.internal.core.ProfileTransactionImpl.adjustProfileChangeRequest(IProfileChangeRequest, IProgressMonitor)), the current profile is considered, and any root IUs (user visible) in the current profile are included as requirements in the change request. So, in general, any root IUs that the user has installed (manually or otherwise via previous p2 tasks), will remain installed, regardless of what new things or updates will be installed to satisfy the p2 task's requirements. This is of course because if a user installs a product using the installer and then installs manually a bunch of additional things, they'd be pretty upset if later Help -> Perform Setup Tasks removed them all again because the Eclipse product they installed doesn't require those things.
So in general, a p2 task cannot and is not designed to uninstall root IUs. Two possibilities, if this were badly needed. One, the p2 task could include a boolean property that would set org.eclipse.oomph.p2.internal.core.ProfileTransactionImpl.setRemoveExistingInstallableUnits(boolean) to true; that seems like a sledge hammer. Or two, a Requirement is able to model a so-called negative requirement to explicitly remove something, i.e, to require it not to be installed.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02945 seconds