Community
Participate
Working Groups
Build Identifier: M20100909-0800 P2 greedy behavior can be manipulated by the p2.inf as it is stated in help.eclipse.org - http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/p2_customizing_metadata.html I'm using a syntax like the following in p2.inf in META-INF folder (plugin level): requires.0.namespace=osgi.bundle requires.0.name={$id_of_optional_plugin} requires.0.greedy=false requires.0.optional=true While the above is working, it is not the case if i insert the p2.inf file in the feature level. In the case when i have an optional package dependency, the p2.inf management is not working neither in plugin and in feature level. Reproducible: Always Steps to Reproduce: Optional package dependency greedy behavior: 1. Create a sample plugin with optional package dependency to other sample plugin. Package the plugins in separate features and create an update site of them. 2. Create p2.inf with the following content requires.0.namespace=osgi.bundle requires.0.name={$id_of_optional_plugin} requires.0.greedy=false requires.0.optional=true 3. Insert the p2.inf file either at plugin (the one with optional package dependency) level in META-INF folder or in feature level (beside feature.xml) 4. Install only the feature plugin with optional dependency. Result: The other plugin got greedily installed as well, no matter of the p2.inf content. Feature level greedy behavior: 1. Create a sample plugin with optional dependency to other sample plugin. Package the plugins in separate features and create an update site of them. 2. Create p2.inf with the following content requires.0.namespace=osgi.bundle requires.0.name={$id_of_optional_plugin} requires.0.greedy=false requires.0.optional=true 3. Insert the p2.inf file in feature level (beside feature.xml) - the one containing the plugin with optional dependency 4. Install only the feature plugin with optional dependency. Result: The other plugin got greedily installed as well, no matter of the p2.inf content.
Can you clarify something .... you talk about the "input" (p2.inf) and the resulting behavior, but an important piece of information is what is in the content.xml file that is produced. Where you want an "optional feature", does specify "optional=true" and "greedy=false"? Or just "optional=true"? (which implies greedy=true). The former case would sound like a bug in p2, but the later would sound like a bug in the p2 publisher. And ... M20100909? Is that Helios SR1? You might want to investigate at least Indigo if not Juno M5 to see if there has been a change or fix. Thanks.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.
This bug was marked as stalebug a while ago. Marking as worksforme. If this report is still relevant for the current release, please reopen and remove the stalebug whiteboard tag.