[go: up one dir, main page]

Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » P2 » How to hook into p2 install/update process?(How to hook into the start or end of an installation/update process)
How to hook into p2 install/update process? [message #802778] Mon, 20 February 2012 12:35 Go to next message
Eclipse UserFriend
Dear Community,
I need to execute a piece of code at the point in time when a p2 installation/update process starts or when it is finished. I know how to execute touchpoint actions, but this is not what I can use because these actions are called for each installable unit in the installation process. What I'm looking for is a way to execute code exactly once during the install/update either at the end or at the beginning of the process.

Here is more background for my case:
- I'm actually calling a touchpoint action during the install phase for each of my features which are located on an update site
- I want to achieve that my action can figure out that it has been called before during the actual install/update because I want to execute my action only once per install/update process (and of course only if one of my features gets installed)
- I tried using a static within my action. The lifetime of the static is "too long" because it is keeping its state if a user performs multiple subsequent installs without restarting

[Updated on: Mon, 20 February 2012 12:36] by Moderator

Report message to a moderator

Re: How to hook into p2 install/update process? [message #802793 is a reply to message #802778] Mon, 20 February 2012 13:03 Go to previous message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
Look at EngineSession, and Touchpoint commit/rollback.

- henrik

On 2012-20-02 13:35, Klaus Kopecz wrote:
> Dear Community,
> I need to execute a piece of code at the point in time when a p2
> installation/update process starts or when it is finished. I know how to
> execute touchpoint actions, but this is not what I can use because these
> actions are called for each installable unit in the installation
> process. What I'm looking for is a way to execute code exactly once
> during the install/update either at the end or at the beginning of the
> process.
>
> Here is more background for my case:
> - I'm actually calling a touchpoint action during the install phase for
> each of my features which are located on an update site
> - I want to achieve that my action can figure out that it has been
> called before during the actual install/update because I want to execute
> my action only once per install/update process (and of course only if
> one of my features gets installed)
> - I tried using a static in my within action. The lifetime of the static
> is "too long" because it is keeping its state if a user performs
> multiple subsequent installs without restarting
Previous Topic:org.eclipse.ui.intro.universal exception during update
Next Topic:Handling system bundle updates using SimpleConfigurator and ConfigApplier
Goto Forum:
  


Current Time: Thu Dec 12 18:38:39 GMT 2024

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

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

Back to the top