Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 237475 - Error building update site with missing optional prerequisite
Summary: Error building update site with missing optional prerequisite
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: Build (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: 3.4.1   Edit
Assignee: pde-build-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-17 10:46 EDT by Samuel Wu CLA
Modified: 2008-07-08 11:11 EDT (History)
4 users (show)

See Also:
aniefer: review? (pascal)


Attachments
patch (1.06 KB, patch)
2008-06-18 11:33 EDT, Andrew Niefer CLA
no flags Details | Diff
patch updated with test (2.08 KB, patch)
2008-06-26 16:45 EDT, Andrew Niefer CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Wu CLA 2008-06-17 10:46:56 EDT
Build ID: Build id: I20080612-2000

Steps To Reproduce:
This is a problem found in the non-p2 driver. 
1. Create an update site project
2. Add feature org.eclipse.platform to the project
3. Run the Build action
4. The following error message is displayed.
Problems during export
  Unable to find feature: org.eclipse.equinox.p2.user.ui.
This makes it impossible to patch the feature org.eclipse.platform through the update site.
Feature org.eclipse.equinox.p2.user.ui should be removed since non-p2 driver doesn't have it


More information:
Comment 1 Samuel Wu CLA 2008-06-18 09:16:57 EDT
I'm changing the severity of the problem since it may prevent us from patching the product in the future.
Comment 2 John Arthorne CLA 2008-06-18 11:26:15 EDT
I can reproduce with a simple update site containing a feature with an optional prerequisite that is missing.
Comment 3 Andrew Niefer CLA 2008-06-18 11:33:45 EDT
Created attachment 105301 [details]
patch
Comment 4 Andrew Niefer CLA 2008-06-18 11:34:16 EDT
There is a bug in the error handling for missing features.  Optional features should be allowed to be missing, the exception is escaping when it should be caught.

The platform feature itself is correct and won't be changed.

For the purposes of building patches, having the p2.ui feature available at build time would allow things to proceed.
Comment 5 Steve Francisco CLA 2008-06-18 15:45:23 EDT
Does this mean a workaround is to have the p2 feature present at build time but it can be safely omitted from the actual update site?  If so that seems like a reasonable workaround to me.  Can the problem be corrected for 3.4.1?
Comment 6 Andrew Niefer CLA 2008-06-18 16:35:41 EDT
(In reply to comment #5)
> Does this mean a workaround is to have the p2 feature present at build time but
> it can be safely omitted from the actual update site?  If so that seems like a
> reasonable workaround to me.  Can the problem be corrected for 3.4.1?
> 

Yes, that should be the case.   You would want to omit not just the feature but all the plugins it includes as well.

This is fixable for 3.4.1
Comment 7 Andrew Niefer CLA 2008-06-26 16:45:56 EDT
Created attachment 105956 [details]
patch updated with test
Comment 8 Andrew Niefer CLA 2008-06-26 16:47:16 EDT
Fixed in HEAD. Pascal, please review for 3.4.1
Comment 9 Andrew Niefer CLA 2008-07-08 11:11:06 EDT
done in HEAD & 3.4.1