Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331265 - Cannot patch a feature you don't have installed
Summary: Cannot patch a feature you don't have installed
Status: CLOSED WORKSFORME
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-27 00:26 EST by Ian Bull CLA
Modified: 2010-12-17 10:28 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Bull CLA 2010-11-27 00:26:08 EST
If you try to install an IU that includes a feature patch, and you don't have the feature patch installed, the installation fails.

For example
1. Install the Eclipse-Platform (not the SDK)
2. Add: http://dist.springsource.org/release/GRECLIPSE/e3.6/
3. Select "Contact all update sites" (and make sure helios is listed)
4. Install Groovy-Eclipse Feature

This will fail, even though the feature we want to patch exists in helios.

Cannot complete the install because one or more required items could not be found.
  Software being installed: Groovy-Eclipse Feature 2.1.0.xx-20101020-1000-e36-release (org.codehaus.groovy.eclipse.feature.feature.group 2.1.0.xx-20101020-1000-e36-release)
  Missing requirement: JDT Core patch for Groovy-Eclipse plugin 2.1.0.xx-20101020-1000-e36-release (org.codehaus.groovy.jdt.patch.feature.group 2.1.0.xx-20101020-1000-e36-release) requires 'org.eclipse.jdt.feature.group [3.6.0,3.6.2)' but it could not be found
  Cannot satisfy dependency:
    From: Groovy-Eclipse Feature 2.1.0.xx-20101020-1000-e36-release (org.codehaus.groovy.eclipse.feature.feature.group 2.1.0.xx-20101020-1000-e36-release)
    To: org.codehaus.groovy.jdt.patch.feature.group [2.1.0.xx-20101020-1000-e36-release]
Comment 1 Ian Bull CLA 2010-11-27 17:17:06 EST
If you install the JDT (or include it in your plan) then things install fine.  Without any digging (just speculation), I wonder if p2 is marking the 'patched feature' (the feature being patched by the feature patch) as 'non-greedy' and 'required'.

This would explain why p2 won't fetch the JDT for you, but happily complain when it's not there.  Does anybody know if this is the case?  Is this by design?
Comment 2 Pascal Rapicault CLA 2010-12-16 21:14:13 EST
This is the desired behaviour. Patches are a mechanism to fix pre-installed things, consequently it should not try to install the things being patched.
Comment 3 Ian Bull CLA 2010-12-17 01:44:06 EST
Thanks Pascal. After the discussion a few weeks ago, I meant to come back and close this.

In the case of groovy, if this is a problem, the groovy core can put a dependency on the JDT itself, this will pull in the JDT and Patch it.  I've tested this and it appears to work.
Comment 4 Andrew Eisenberg CLA 2010-12-17 10:28:25 EST
(In reply to comment #3)
> In the case of groovy, if this is a problem, the groovy core can put a
> dependency on the JDT itself, this will pull in the JDT and Patch it.  I've
> tested this and it appears to work.

That's the solution that we have.  The core patch feature patches jdt.core and the groovy.core feature references jdt.core.  This particular set-up has been working for us so far.  There is particular reason to install the core patch without installing the rest of groovy.  However, I could imagine situations where this might be necessary for patches of other features.