[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Smooth transition for EclEmma

If I correctly understood you, then given releases old_v1, new_v2, new_v3 update sequence old_v1 -> new_v3 won't be possible.
This concern also was raised for m2e-wtp <http://lists.jboss.org/pipermail/jbosstools-dev/2012-August/005793.html> and as per <https://bugs.eclipse.org/bugs/show_bug.cgi?id=394156> resolved.
So proposal to remove update advise in subsequent release seems incorrect.

And answering your question - yes, plugin ids are also renamed.

On Sat, Oct 29, 2016 at 4:25 PM, Alena Laskavaia <elaskavaia.cdt@xxxxxxxxx> wrote:
Update description specification looks like it allow multiple version but in reality its only one (looking in the code),
so I don't think you can specify two different id you can update from. So on first rename you need to list previous id/name, from after you release that one you should remove your update advice
(are you updating plugin id's as well?)

On Sat, Oct 29, 2016 at 9:27 AM, Evgeny Mandrikov <mandrikov@xxxxxxxxx> wrote:
Hi P2 experts,

We are preparing initial release of EclEmma <https://projects.eclipse.org/projects/technology.eclemma> under Eclipse Foundation umbrella.
And we would like to provide for our users smooth transition from its ancestor <https://github.com/jacoco/eclemma>.

So as was advised by our mentor Mickael Istria - based on <https://github.com/eclipse/m2e.wtp/blob/master/org.eclipse.m2e.wtp.feature/p2.inf> I've tried to create p2.inf
Here is its content with comments describing my assumptions:

###

# can update any "com.mountainminds.eclemma.feature" and previous versions of "org.eclipse.eclemma.feature"
update.matchExp = providedCapabilities.exists(pc | pc.namespace \=\= 'org.eclipse.equinox.p2.iu' && (pc.name \=\= 'com.mountainminds.eclemma.feature.feature.group' || pc.name \=\= 'org
.eclipse.eclemma.feature.feature.group' && pc.version < '$version$'))

# requires additional IU described below
requires.0.namespace=osgi.bundle
requires.0.name=com.mountainminds.eclemma
requires.0.range=[$version$, $version$]

units.1.id=com.mountainminds.eclemma
units.1.version=$version$
units.1.singleton=true
units.1.provides.0.namespace=osgi.bundle
units.1.provides.0.name=com.mountainminds.eclemma
units.1.provides.0.version=$version$

# to not overwrite the main artifact, the additional IU should have classifier (https://bugs.eclipse.org/bugs/show_bug.cgi?id=430728)
units.1.properties.1.name=maven-classifier
units.1.properties.1.value=p2inf

# TODO explain
units.1.properties.0.name=org.eclipse.equinox.p2.name
units.1.properties.0.value=This version cannot be installed on top of the already installed EclEmma plugin. Uninstall the previous version and try the install again.

###

And below is a description of performed testing with undesirable outcome.

Using:
Âfresh installation of Eclipse IDE for Java Developers (Version: Neon.1a Release (4.6.1) Build id: 20161007-1200)
Given:
Âold 2.3.3.201602231923 installed from <http://update.eclemma.org/>
When:
Âinstalling new one from local build directory
Then:
Âcorrectly upgraded to 2.3.4.201610291259
When:
Ânew build is available and checking for update
Then:
Âcorrectly upgraded to more newer 2.3.4.201610291310
When:
Âinstalling old one from <http://update.eclemma.org/>
Expected:
Âfailure
Actual:
Âboth (2.3.3.201602231923 and 2.3.4.201610291310) are installed

Any help/ideas are more than welcome.

Regards,
Evgeny



_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/p2-dev


_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/p2-dev



--
Best regards,
Evgeny Mandrikov aka Godin <http://godin.net.ru>
http://twitter.com/_godin_