Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-user] Making "Check for Updates" work after feature rename (using p2.inf?)

Hi all,

one of our features (built with Tycho, of course) is about to be
renamed, from org.example.old to org.example.new.

Obviously, we want to allow users of org.example.old to automatically
update to org.example.new using "Check for Updates". Using a p2.inf
together with the feature makes this possible [1] :-)

  org.example.new/p2.inf:

    update.id = org.example.old.feature.group
    update.range = 0.0.0
    update.severity = 0

Alas, with this definition in place it is no longer possible to update
from one version of org.example.new to an even newer version of this
feature :-(.

Looking at the content.jar, I found the following:

  <unit id='org.example.new.feature.group' version='1.0.0'
singleton='false'>
    <update id='org.example.old.feature.group' range='0.0.0' severity='0'/>
    ...
  </unit>

The single <update> element indeed seems to suggest that org.example.old
-> org.example.new is the only valid upgrade path.

I attempted to manually add a second <update> element for
org.example.new.feature.group, but that didn't have the desired effect.
Also, the following cargo-cult p2.inf didn't work [2].

  org.example.new/p2.inf:

    update.0.id = org.example.old.feature.group
    update.0.range = 0.0.0
    update.0.severity = 0
    update.1.id = org.example.new.feature.group
    update.1.range = 0.0.0
    update.1.severity = 0

So, is there a way to tell p2 (using Tycho) that org.example.new 2.0.0
is an update for both org.example.new 1.0.0 *and* also for any version
of org.example.old. Maybe p2iu.xml's can do the trick [3], but I
honestly don't know how, given the (lack of) available documentation.

Any help is thus greatly appreciated.

Best wishes,

Andreas

[1] <http://eclipsesource.com/blogs/2012/06/04/tycho-maven-p2-inf-2/>
[2] <http://wiki.eclipse.org/Equinox/p2/Customizing_Metadata>
[3] <http://wiki.eclipse.org/Tycho/p2iu.xml>

-- 
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


Back to the top