Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Updating a feature after renaming id

I think this might have been achieved in some way in support of the migration of m2e-wtp from Sonatype to Eclipse.

http://www.eclipse.org/m2e-wtp/download/

Browsing source, I see this p2.inf file:

http://git.eclipse.org/c/m2e-wtp/org.eclipse.m2e.wtp.git/tree/org.eclipse.m2e.wtp.feature/p2.inf

See also:

http://eclipsesource.com/blogs/2012/06/04/tycho-maven-p2-inf-2/

On 01/08/2013 05:57 PM, Jeff MAURY wrote:
I'm afraid changing the id of an existing feature/bundle is a bad idea.
If I understand correctly, what you want to achieve is to make sure the
feature with the old id gets uninstalled when the new feature is
installed/updated, am I right ?
There is a P2 touchpoint action that allows to uninstall some feature
but I never figure out how to use it as it seems you need to know the
full feature coordinates (including the version) and I don't know the
behaviour if the feature you want to uninstall is not present but I'm
afraid it will raise an error

Jeff MAURY


On Tue, Jan 8, 2013 at 7:38 PM, Julien HENRY <henryju@xxxxxxxx
<mailto:henryju@xxxxxxxx>> wrote:

    Hi,

    This is not a tycho specific question but instead a p2/eclipse
    question but I don't where to ask. Please redirect me if you think
    this is not appropriate.

    In our Eclipse plugin we have a feature that has been replaced by
    another one with a different id. In order to ease migration for end
    users I have added the following instructions in the p2.inf of the
    new feature:
    update.id <http://update.id> = old.feature.id <http://old.feature.id>
    update.range = [0.0.0,3.0.0)
    update.severity = 0
    update.description = Update feature with old ID.

    It works fine as long as user try to update from old.feature to new
    feature. But in case user has already updated to new feature (in our
    case a release candidate of the 3.0.0 version) then they are no more
    allowed to update as it seems new feature 3.0.0.456 is not
    considered as a valid update for previous new feature 3.0.0.123.

    I tried to add 2 possible updates in the p2.inf:
    update.0.id <http://update.0.id> = old.feature.id
    <http://old.feature.id>
    update.0.range = [0.0.0,3.0.0)
    update.0.severity = 0
    update.0.description = Update feature with old ID.
    update.1.id <http://update.1.id> = new.feature.id
    <http://new.feature.id>
    update.1.range = [0.0.0,$version$)
    update.1.severity = 0
    update.1.description = Update feature with new id.

    But it doesn't work as in the resulting content.xml there is only
    one <update> element under the <unit id="new.feature.id
    <http://new.feature.id>">.

    Do you know if it is a valid expectation to have several <update>
    elements under <unit>? In this case what is the way to achieve this?

    Thanks

    Julien

    _______________________________________________
    tycho-user mailing list
    tycho-user@xxxxxxxxxxx <mailto:tycho-user@xxxxxxxxxxx>
    https://dev.eclipse.org/mailman/listinfo/tycho-user




--
Jeff MAURY


"Legacy code" often differs from its suggested alternative by actually
working and scaling.
�- Bjarne Stroustrup

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury


_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user


--
Nick Boldt :: http://nick.divbyzero.com




Back to the top