Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 312937

Summary: [publisher] Support for match expressions in p2.inf
Product: [Eclipse Project] Equinox Reporter: Ralf Sternberg <rsternberg>
Component: p2Assignee: P2 Inbox <equinox.p2-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: beyhan.veliev, david_williams, ekke, florian.pirchner, gregory.amerson, gunnar, holger.staudacher, irbull, jan.sievers, mknauer, pascal, ruediger.herrmann, tjwatson
Version: 3.6   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug
Bug Depends on: 373725    
Bug Blocks: 306709    
Attachments:
Description Flags
introduces min and max to the advice file none

Description Ralf Sternberg CLA 2010-05-14 12:29:37 EDT
We need a way to express that one installable unit must not be installed together with another one in order to safely prevent cases where runtime bundles are installed into the IDE. As an example, the RAP runtime feature contains several IUs (bundles) that conflict with IUs from the platform:

org.eclipse.rap.rwt conflicts with org.eclipse.swt
org.eclipse.rap.ui conflicts with org.eclipse.ui
org.eclipse.rap.ui.workbench conflicts with org.eclipse.ui.workbench
...

It should be possible to express those conflicts declaratively to let the p2 publisher include them in the repository metadata.
Comment 1 Beyhan Veliev CLA 2011-02-11 03:58:18 EST
What is the status of this bug? Are there any plans in 3.7 for this bug?
Comment 2 Pascal Rapicault CLA 2011-02-14 21:35:33 EST
No plan for this. Contributions welcomed.
Comment 3 Thomas Watson CLA 2012-03-07 10:57:14 EST
Ian, we need to discuss this bug in relation to the p2-dev posting http://dev.eclipse.org/mhonarc/lists/p2-dev/msg04697.html
Comment 4 Ian Bull CLA 2012-03-08 19:35:08 EST
Created attachment 212341 [details]
introduces min and max to the advice file

Fully match expressions are hard because the advice file expects things to have namsapces / names (for capabilities).  And while expression may have these, the are expected to be variables (I'm not even sure what that means in a string).

However, for negation requirements, we really only need min and max to be set (both to 0). This patch allows

requires.<#>.min = 0
requires.<#>.min = 0

Iff both of these are set, then these are used instead of multiple / optional.
Comment 5 Ian Bull CLA 2012-03-08 23:46:56 EST
I've implemented min/max which is enough to specify negate.  See bug 373725.
Comment 6 Lars Vogel CLA 2019-11-14 03:36:47 EST
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.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.