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