Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Preserving update path for feature that is moved/refactored

Thanks, that was exactly what I was looking for.

-- Jeff J.

On 01/12/2012 01:25 AM, Mengxin Zhu wrote:
Looks like you want to remove the old version of Autotools feature when
installing new Autotools feature that will be moved to CDT. I guess the
moving will rename the plug-ins, so it won't be an updating of old
Autotools. It might cause duplicated UI widgets.

You can use p2.inf to create some dummy IUs of old plug-ins. P2 will
update the existing old Autotools feature to the dummy version when
installing new Autotools.

For example,

The name of old Autotools feature is
'org.eclipse.linuxtools.somefeature', its version is 2.0. Create a dummy
IU for it with version 3.0, but it doesn't have the actual plug-ins.
After updating old feature to this dummy one, the old feature and its
plug-ins will be removed.

units.0.id=org.eclipse.linuxtools.somefeature
units.0.version=3.0.0
units.0.touchpoint.id=org.eclipse.equinox.p2.osgi
units.0.touchpoint.version=1.0.0
units.0.singleton=true
units.0.update.id=org.eclipse.linuxtools.somefeature
units.0.update.range=[0.0.0,3.0.0)
units.0.update.severity=0
units.0.provides.1.namespace=org.eclipse.equinox.p2.iu
units.0.provides.1.name=org.eclipse.linuxtools.somefeature
units.0.provides.1.version=3.0.0

Mengxin Zhu


On 01/12/2012 03:58 AM, Jeff Johnston wrote:
Hello,

I posted to the p2-dev forum and didn't see any response so I thought
I would try here as well.

I am in the midst of moving a feature and its plug-ins (Autotools)
from the Linux Tools project into the CDT. I have looked into
supporting old projects created with the old pre-refactored plug-ins
and it is feasible. Supporting old projects would be desirable since
there can be a number of configurations associated with the project
and currently converting the project over destroys this data.

What I am thinking of doing is to create a shell Autotools feature
that requires the new CDT version of the plug-ins. When a user tries
to update via the Linux Tools update site, they will end up requiring
the new version of CDT that contains the Autotools functionality. I
need to create a shell plug-in as well that specifies the previous
builder id and ties this to the new CDT class as the builder extension
automatically adds in the plug-in portion of the id.

Conceivably I could include the shell feature and plug-in both in CDT
itself and with Linux Tools so that there would be no way of ending up
with both old and new versions present at the same time (duplicate UI
widgets such as menus).

Is there a better p2 way of doing this to ensure updating works properly?

Regards,

-- Jeff J.
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev



Back to the top