Bug 310674 - Container feature not gathered when bin.includes is non-empty
Summary: Container feature not gathered when bin.includes is non-empty
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: Build (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.6 M7   Edit
Assignee: pde-build-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 309723
  Show dependency tree
 
Reported: 2010-04-27 13:20 EDT by Andrew Niefer CLA
Modified: 2010-06-07 13:05 EDT (History)
1 user (show)

See Also:


Attachments
patch (2.03 KB, patch)
2010-04-28 14:19 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 Andrew Niefer CLA 2010-04-27 13:20:40 EDT
Bug 284499 introduced changes:
- when building p2, gather up features that would have been excluded in regular builds (ie features with empty bin.includes).
-  EXCEPT for the generated container features.

The exclusion of the generated container features applies to all builds, not just p2 builds.  This is a problem if the user explicitly modifies the container's build.properties to specify a bin.includes property.

This should probably be:
1) if the bin.includes is not empty, gather the feature (p2 or not)
2) if doing p2, gather the feature even if the bin.includes is empty, except if it is the generated container feature.
Comment 1 Andrew Niefer CLA 2010-04-28 14:19:15 EDT
Created attachment 166361 [details]
patch
Comment 2 Andrew Niefer CLA 2010-04-28 14:22:42 EDT
fixed
Comment 3 David Williams CLA 2010-06-07 04:15:53 EDT
So, assuming these rules were the final ones: 

1) if the bin.includes is not empty, gather the feature (p2 or not)

2) if doing p2, gather the feature even if the bin.includes is empty, except if
it is the generated container feature.

But, we in WTP has some features (we called "assembly features") which we use to "guide" what's built, but we don't want them included in the final build repos or distributions. We used to do this by leaving the build.properties file empty. 

But now, moving to a "pure" p2 build, they are included, even though empty. How can we have them not included? (We want the features they build included ... but not them. 

What am I missing?
Comment 4 Andrew Niefer CLA 2010-06-07 09:54:56 EDT
Try not having bin.includes in the feature's build.properties at all (instead of just having it empty).

When doing p2 on these features, yes they are gathered up, but you should not end up with a feature.jar in the results.  You do end up with the feature.group metadata for it.
Comment 5 David Williams CLA 2010-06-07 10:32:16 EDT
Yes, our build.properties file is completely empty. That's how we have been doing it. I did try adding empty bin.includes, but pretty sure the same result. 

And we do end up with the literal artifact in /features 

I'll try more systematically now, but your saying a completely empty build.properties should result in no artifact. (Or should there be something else in there, just not bin.includes?) 

Even if no artifact, does having the feature.group make it appear to be installable? Or is p2 update UI "smart" and know not to show it, if no artifact?
Comment 6 David Williams CLA 2010-06-07 11:44:26 EDT
yes, artifact is created/included in repo. It is (just) the zipped feature.xml file. 

It is, btw, the exact one that is named as topLevelElementId for use in allElements.xml file. Maybe that's causing it? 

I think "sub" assembly features are not being included. (still testing).
Comment 7 David Williams CLA 2010-06-07 13:05:50 EDT
Wait, no. Artifact is not created if build.properties is completely empty. My systematic test had flaws :( So, that's as expected. 

Now I'm still wondering if it is in content metadata, if it will show up to users as something they could install. If so, sounds like I'll need to do some final "surgery" on the repo.