Community
Participate
Working Groups
Created attachment 198467 [details] patch-test build 3.7 I created a patch for a specific version range of a feature, but that range is not respected and p2 still allows the patch to try to be installed. For instance, here we specify a patch for the RCP feature but only versions [1,2). If you try to install this into Eclipse 3.7, it allows to you continue. I'll attach this example. <unit id='rcp.patch.feature.group' version='1.0.0' singleton='false'> <patchScope> <scope> <requires size='1'> <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.rcp.feature.group' range='[1.0.0,2.0.0)'/> </requires> </scope> </patchScope>
Adding Pascal and Daniel to the CC list. Does this mean we aren't encoding the feature version range correctly?
Note, these are the operands that I'm seeing being created when I'm trying to install the above patch into Eclipse 3.7. I would expect it to fail based on the requirement from the rcp.patch.feature.group IU to org.eclipse.rcp.feature.group [1.0,2.0). null --> [R]rcp.patch.feature.group 1.0.0 null --> [R]rcp.patch.feature.jar 1.0.0 [IInstallableUnit property for rcp.patch.feature.group 1.0.0] org.eclipse.equinox.p2.internal.inclusion.rules = null --> OPTIONAL [IInstallableUnit property for rcp.patch.feature.group 1.0.0] org.eclipse.equinox.p2.type.root = null --> true
Hi DJ, I won't be able to take a look at it before next week. I think that the problem is probably not the range but the way we encode patch.
Ok, thanks Daniel.
This bug seems to be a duplicate of bug #252897. However just to be precise, what controls when the patch gets applied is the lifecycle section the IU: <lifeCycle> <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.rcp.feature.group' range='0.0.0' greedy='false'/> </lifeCycle> The applicability scope is supposed to limit the IU to which the patch is applied (e.g. all the IUs across all the system or just a few), and a quick search in the code indicates that it is not being used at all, but we will have to be careful because I think it used to be that the scope was being merged with other things like general requirements when read from the repo and it was how we would get it to work. I'm leaving the bug open to continue the conversation on the goal to be achieved
I will take a look at the original bug report.
I'll bump this to kepler so it doesn't get lost. I would like to find some resolution though.
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.