Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Single-pass update of jar and action?
Single-pass update of jar and action? [message #131120] Mon, 11 May 2009 18:11 Go to next message
michael.sacarny is currently offline michael.sacarnyFriend
Messages: 103
Registered: July 2009
Location: USA
Senior Member
I would like to be able to update a custom action so that when the
containing jar updates, the very latest version of the action fires. I
believe this problem is outlined in this link (item 3):
http://www.eclipse.org/newsportal/article.php?id=6120&gr oup=eclipse.technology.equinox#6120

Simon's response indicates that a solution has been checked into head that
provides for single-pass update. Yet, when I make a 3.5M7 test application
and update site with his examples of custom configure actions (at
http://dev.eclipse.org/mhonarc/lists/p2-dev/msg01379.html), they seem to
require two update passes. That is, the custom configure action occurs,
but is the action of the previous update.

For example, I added to the DummyAction execute() function:
System.out.println("test1");
and installed p2.example.metareq.feature in my test app. "test1" is
output. I then incremented to "test2", rebuilt, and updated - "test1" is
again output. Then I incremented to "test3" and updated - "test2" is
output.

Have I misunderstood the the problem? Did the fix not make it into 3.5M7?
Or do I need something else in the p2.infs?

Thanks in advance!
MSacarny
Re: Single-pass update of jar and action? [message #131133 is a reply to message #131120] Mon, 11 May 2009 18:52 Go to previous messageGo to next message
Simon Kaegi is currently offline Simon KaegiFriend
Messages: 381
Registered: July 2009
Senior Member
Hmm... that looks like it should work. Is your meta-requirement bumping the
version requirement on the action?

Also see https://bugs.eclipse.org/bugs/show_bug.cgi?id=251432 for supporting
more than one action.touchpoint version at one time. This is not in 3.5 and
a bit more complicated than what you need but might be worth tracking.

-Simon

" MSacarny" <michael.sacarny@analog.com> wrote in message
news:470936d716b8c3733496f8d96372229e$1@www.eclipse.org...
>I would like to be able to update a custom action so that when the
>containing jar updates, the very latest version of the action fires. I
>believe this problem is outlined in this link (item 3):
> http://www.eclipse.org/newsportal/article.php?id=6120&gr oup=eclipse.technology.equinox#6120
>
> Simon's response indicates that a solution has been checked into head that
> provides for single-pass update. Yet, when I make a 3.5M7 test application
> and update site with his examples of custom configure actions (at
> http://dev.eclipse.org/mhonarc/lists/p2-dev/msg01379.html), they seem to
> require two update passes. That is, the custom configure action occurs,
> but is the action of the previous update.
> For example, I added to the DummyAction execute() function:
> System.out.println("test1");
> and installed p2.example.metareq.feature in my test app. "test1" is
> output. I then incremented to "test2", rebuilt, and updated - "test1" is
> again output. Then I incremented to "test3" and updated - "test2" is
> output.
>
> Have I misunderstood the the problem? Did the fix not make it into 3.5M7?
> Or do I need something else in the p2.infs?
>
> Thanks in advance!
> MSacarny
>
Re: Single-pass update of jar and action? [message #131171 is a reply to message #131133] Tue, 12 May 2009 14:32 Go to previous message
michael.sacarny is currently offline michael.sacarnyFriend
Messages: 103
Registered: July 2009
Location: USA
Senior Member
Simon,
I'm using the examples in
http://www.eclipse.org/newsportal/article.php?id=6120&gr oup=eclipse.technology.equinox#6120,
so the Feature p2.inf was this:

metaRequirements.0.namespace=org.eclipse.equinox.p2.engine.a ctions
metaRequirements.0.name=p2.examples.provides.actionforfeatur e.dummyaction
metaRequirements.0.range=1.0
instructions.configure.import=p2.example.provides.actionforf eature.dummyaction
instructions.configure=dummyaction();

which I changed to this:
metaRequirements.0.namespace=org.eclipse.equinox.p2.engine.a ctions
metaRequirements.0.name=p2.examples.provides.actionforfeatur e.dummyaction
metaRequirements.0.range=1.0
instructions.configure=p2.example.provides.actionforfeature. dummyaction();

and the plugin p2.inf is this:
provides.0.namespace=org.eclipse.equinox.p2.engine.actions
provides.0.name=p2.examples.provides.actionforfeature.dummya ction
provides.0.version=1.0

I added this to the execute() function
System.out.println("test1");

On the initial install, "test1" is output. Then I bumped the
Feature/Plugin version numbers, changed "test1" to "test2", rebuilt, and
upgraded. "test1" is still output, showing that single pass update did not
work.

Then I bumped Feature/Plugin version numbers, changed "test1" to "test2",
changed the Plugin p2.inf:
provides.0.version=1.1
and Feature p2.inf:
metaRequirements.0.range=1.1

When I attempt to upgrade, I get this warning message:
"The software items you selected may not be valid with your current
installation. Do you want to open the wizard anyway to review the
selections?"
If I continue, the upgrade fails.

So, what am I missing/getting wrong here? [Note: In both p2.infs, the name
value refers to "example" rather than "example" but does not seem to
matter.]

Thanks,
MSacarny
Previous Topic:Query regarding P2 director application
Next Topic:How to provision eclipse plug-ins in my p2 repository
Goto Forum:
  


Current Time: Fri Apr 26 18:46:12 GMT 2024

Powered by FUDForum. Page generated in 0.02958 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top