Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325036 - p2SiteGenerator actor fails when extra prerequisites are specified
Summary: p2SiteGenerator actor fails when extra prerequisites are specified
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Buckminster (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: buckminster.core-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-11 16:34 EDT by Michal Ruzicka CLA
Modified: 2019-02-25 14:40 EST (History)
1 user (show)

See Also:


Attachments
org.eclipse.buckminster.pde-allow_prerequisites_for_p2SiteGenerator.patch (2.60 KB, patch)
2010-09-14 09:27 EDT, Michal Ruzicka CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Ruzicka CLA 2010-09-11 16:34:46 EDT
STEPS TO REPRODUCE
1) Have a feature project on which you can successfully execute the "site.p2" action, let the project be named "test.feature"

2) Add a buckminster.cspex file to the feature project with the following content:
<cspecExtension xmlns="http://www.eclipse.org/buckminster/CSpec-1.0">
	<actions>
		<private name="extra.site.p2.prerequisite" actor="null" />
	</actions>

	<alterActions>
		<public name="site.p2">
			<prerequisites>
				<attribute name="extra.site.p2.prerequisite" />
			</prerequisites>
		</public>
	</alterActions>
</cspecExtension>

3) Invoke the "site.p2" action on the project

ACTUAL RESULT
All the prerequisites of the "site.p2" action are executed successfully including the extra prerequisite but the execution of the "site.p2" action itself fails, as documented in the buckminster log:
...
[start test.feature:eclipse.feature$1.0.0.qualifier#extra.site.p2.prerequisite]
[end test.feature:eclipse.feature$1.0.0.qualifier#extra.site.p2.prerequisite]
[start test.feature:eclipse.feature$1.0.0.qualifier#site.p2]
Prerequisite with name extra.site.p2.prerequisite is not known to action test.feature:eclipse.feature$1.0.0.qualifier#site.p2

EXPECTED RESULT
The action execution succeeds as before only the extra prerequisite is executed just before the site.p2 action itself, the buckminster log looks something like this:
...
[start test.feature:eclipse.feature$1.0.0.qualifier#extra.site.p2.prerequisite]
[end test.feature:eclipse.feature$1.0.0.qualifier#extra.site.p2.prerequisite]
[start test.feature:eclipse.feature$1.0.0.qualifier#site.p2]
[end test.feature:eclipse.feature$1.0.0.qualifier#site.p2]

ADDITIONAL INFO
By inspection of org.eclipse.buckminster.pde.internal.actor.P2SiteGenerator.internalPerform() it is clear that the p2SiteGenerator actor does not accept any extra prerequisites - it throws IllegalPrerequisiteException() at line 381 if any such prerequisite is encountered.
I believe this is wrong. IMO the p2SiteGenerator actor should ignore the extra prerequisites, optionally it could issue warning(s) in this respect.
Comment 1 Michal Ruzicka CLA 2010-09-14 09:27:30 EDT
Created attachment 178828 [details]
org.eclipse.buckminster.pde-allow_prerequisites_for_p2SiteGenerator.patch

The attached patch fixes the described problem fro me, please consider it for inclusion.
Comment 2 Thomas Hallgren CLA 2010-09-15 01:20:12 EDT
This patch looks good. Please commit it to the helios-maintenance branch.
Comment 3 Michal Ruzicka CLA 2010-09-15 13:04:46 EDT
patch committed to the helios-maintenance branch in revision 11580