Community
Participate
Working Groups
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 Build Identifier: M20090917-0800 Export of deployable feature using the "categorize repository" option results in a wrong version attribute for the self provided capability of category IU in the created p2 repository. This is what was created: <unit id='my.category' version='0.0.0.20091201103322'> <properties size='3'> <property name='org.eclipse.equinox.p2.name' value='Category'/> <property name='org.eclipse.equinox.p2.description' value='Description'/> <property name='org.eclipse.equinox.p2.type.category' value='true'/> </properties> <provides size='1'> <provided namespace='org.eclipse.equinox.p2.iu' name='my.category' version='0.0.0'/> </provides> And this is what was expected: <unit id='my.category' version='0.0.0.20091201103322'> <properties size='3'> <property name='org.eclipse.equinox.p2.name' value='Category'/> <property name='org.eclipse.equinox.p2.description' value='Description'/> <property name='org.eclipse.equinox.p2.type.category' value='true'/> </properties> <provides size='1'> <provided namespace='org.eclipse.equinox.p2.iu' name='my.category' version='0.0.0.20091201103322'/> </provides> In the source code we see that for the self provided capability version always an empty version is set. Reproducible: Always Steps to Reproduce: 1. create an empty feature 2. create category.xml file which defines one category for the feature created in step 1 3. right-click on the feature project -> Export -> Deployable Features, Next, select the Options tab, check "categorize repository" and point to the category.xml file 4. Finish Now check the content.xml contained in the <output-dir>\content.jar according to the detailed bug description.
Created attachment 153429 [details] Proposed patch for the reported bug
Created attachment 153430 [details] Example project to reproduce the bug
done in HEAD and the api branch. Also added a small test.
Hi Andrew, thank you very much to pick up this issue so fastly! Would it be possible to get the same bug-fix for 3.5.2?