Andreas Sewe
2017-09-05 12:05:07 UTC
Hi,
I have a Tycho build containing two features org.example.foo and
org.example.bar, which both use a p2.inf to state a *negative*
Unfortunately, it also prevents Tycho from building an
offer the user both features Foo and Bar on the same update site, but
prevent that he installs both.
Is this possible?
Andreas
[1]
<https://wiki.eclipse.org/Equinox/p2/Customizing_Metadata#Capability_Advice:>
--
Codetrails GmbH
The best code possible
Robert-Bosch-Str. 7, 64293 Darmstadt
Phone: +49-6151-276-7092
Mobile: +49-170-811-3791
http://www.codetrails.com/
Managing Director: Dr. Marcel Bruch
Handelsregister: Darmstadt HRB 91940
I have a Tycho build containing two features org.example.foo and
org.example.bar, which both use a p2.inf to state a *negative*
requires.0.namespace = org.eclipse.equinox.p2.iu
requires.0.name = org.example.bar.feature.group
requires.0.min = 0
requires.0.max = 0
requires.0.namespace = org.eclipse.equinox.p2.iu
requires.0.name = org.example.foo.feature.group
requires.0.min = 0
requires.0.max = 0
This is meant to prevent these two features from being installed together.requires.0.name = org.example.bar.feature.group
requires.0.min = 0
requires.0.max = 0
requires.0.namespace = org.eclipse.equinox.p2.iu
requires.0.name = org.example.foo.feature.group
requires.0.min = 0
requires.0.max = 0
Unfortunately, it also prevents Tycho from building an
[ERROR] Software being installed: updates raw:1.0.0.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):1.0.0-SNAPSHOT
[ERROR] Cannot satisfy dependency: org.example.foo.feature.group 1.0.0.qualifier depends on: org.example.bar.feature.group 0.0.0
[ERROR] Cannot satisfy dependency: updates raw:1.0.0.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):1.0.0-SNAPSHOT depends on: org.example.foo.feature.group 0.0.0
[ERROR] Cannot satisfy dependency: updates raw:1.0.0.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):1.0.0-SNAPSHOT depends on: org.example.bar.feature.group 0.0.0
For me, this defeats the purpose of the negative requirements: I want to[ERROR] Cannot satisfy dependency: org.example.foo.feature.group 1.0.0.qualifier depends on: org.example.bar.feature.group 0.0.0
[ERROR] Cannot satisfy dependency: updates raw:1.0.0.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):1.0.0-SNAPSHOT depends on: org.example.foo.feature.group 0.0.0
[ERROR] Cannot satisfy dependency: updates raw:1.0.0.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):1.0.0-SNAPSHOT depends on: org.example.bar.feature.group 0.0.0
offer the user both features Foo and Bar on the same update site, but
prevent that he installs both.
Is this possible?
Andreas
[1]
<https://wiki.eclipse.org/Equinox/p2/Customizing_Metadata#Capability_Advice:>
--
Codetrails GmbH
The best code possible
Robert-Bosch-Str. 7, 64293 Darmstadt
Phone: +49-6151-276-7092
Mobile: +49-170-811-3791
http://www.codetrails.com/
Managing Director: Dr. Marcel Bruch
Handelsregister: Darmstadt HRB 91940