[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[p2-dev] p2ql: Allowing multiple update paths for feature (using Check for Updates)

Hi p2 developers,

this is a rough follow-up on a problem I encountered 2015 [1], but
didn't receive a reply yet. Then, I abandoned my attempts to use p2ql
expressions to allow automatic updates after a rename, but now I have
the need again for a different project (SpotBugs, a FindBugs fork).

The problem is this: I have a p2ql expression [2] that is meant to
upgrade older versions of FindBugs and SpotBugs:

update.matchExp = providedCapabilities.exists(iu |
  iu.namespace == 'org.eclipse.equinox.p2.iu' &&
  ((iu.name == '@FEATURE_ID@' &&
    iu.version ~= range('[0,@FEATURE_VERSION@)')) || \
   (iu.name == 'edu.umd.cs.findbugs.plugin.eclipse.feature.group' &&
    iu.version ~= range('[0,3.0.3)'))))

Interestingly, upgrading older versions of FindBugs to SpotBugs works,
but updating older versions of SpotBugs to newer versions does *not* (at
least not with "Check for Updates"). I have to manually install it. If I
do, however, p2 *is* capable of figuring out that this is indeed an udate:

> Your original request has been modified.
> "SpotBugs" is already installed, so an update will be performed
> instead.

Can someone enlighten me what I am doing wrong here?

Best wishes,

Andreas

[1] <https://dev.eclipse.org/mhonarc/lists/p2-dev/msg05504.html>
[2]
<https://github.com/sewe/spotbugs/commit/9f25705#diff-51c33c1aec2a23ee1ca1b09c7158e926>

-- 
Codetrails GmbH
The knowledge transfer company

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

Attachment: signature.asc
Description: OpenPGP digital signature