Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » P2 » p2.inf instructions don't use newly updated plugin, instead use the currently installed version(During an update of a custom touchpoint action, the previous version of an action gets called instead of its new version.)
p2.inf instructions don't use newly updated plugin, instead use the currently installed version [message #1863657] Mon, 19 February 2024 14:05
Axel Stein is currently offline Axel SteinFriend
Messages: 10
Registered: February 2024
Junior Member
During the update of a custom touchpoint action, the previous version of the action gets called instead of its new version.

I am trying to update a custom P2 touchpoint action that is called at the configuration phase with a p2.inf file. However, I noticed that during the update process, the old version of the custom action gets called instead of the new version installed with the update.

This is in contrast to when I install the action for the first time (v0), in which case the newly installed action gets invoked during the installation. However, an update will invoke the previous version of the action (v0) from the initial installation, not the newly updated one (v1). An update after that will invoke the previous version (v1), not the currently updated one (v2), and so on.

Is there some way to make P2 invoke the action from the update and not the previous version that is currently installed? By the time we reach the Configure phase we should already be past the Install phase. Since it's possible to invoke the action during its first installation it should also be possible to do this in the update. I have tried using metaRequirements, range, and other instructions, without success.

My code looks as follows:

Plugin: com.project.plugin
└─+com.project.plugin.actions
  └──MyCustomAction.java

plugin.xml:
<plugin>
    <extension
        point="org.eclipse.equinox.p2.engine.actions">
        <action
            class="com.project.plugin.actions.MyCustomAction"
            name="myCustomAction"
            touchpointType="org.eclipse.equinox.p2.native"
            touchpointVersion="1.0.0"
            version="1.0.0">
        </action>
    </extension>
</plugin>

META-INF/p2.inf:
provides.0.namespace=com.project.plugin
provides.0.name=myCustomAction
provides.0.version=1.0.0

Feature: com.project.feature

p2.inf:
metaRequirements.0.namespace=com.project.plugin
metaRequirements.0.name=myCustomAction
metaRequirements.0.range=1.0.0

instructions.configure=com.project.plugin.myCustomAction();

feature.xml:
<feature
    id="com.project.feature"
    label="Feature"
    version="1.0.0.qualifier"
    provider-name="Provider">
    <plugin
         id="com.project.plugin"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>
</feature>

[Updated on: Mon, 19 February 2024 17:23]

Report message to a moderator

Previous Topic:P2 update dialog for E4 application
Goto Forum:
  


Current Time: Sun Nov 10 10:08:41 GMT 2024

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

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

Back to the top