Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » [p2] headless update
[p2] headless update [message #111644] Tue, 10 June 2008 12:20 Go to next message
Eclipse UserFriend
Originally posted by: tim_fooy.inventivedesigners.com

Hi all,
We are working on using p2 as the new installation/update system for our
product, using it in our installer. This means that we need to be able to
call it on headless systems, not using any UI to install or update. We are
using the director application (why is it not included in the agent?) to do
this. So far we have been able to use p2 to install the sample RCP mail
application and get it to work (after some manual tweaking of the
install..), so the director works well in a headless setting.
However I cannot find anything about updating using the director or maybe
some other application? When I re-export the mail application with a higher
version number for both the product and the plugin, and then use the
director to install it on top of the first install of the mail application,
then I get the following error:

!MESSAGE Cannot find a solution where both Match[requiredCapability:
org.eclipse.equinox.p2.iu/rcpmail.product/[1.0.0,1.0.0]] and
Match[requiredCapability:
org.eclipse.equinox.p2.iu/rcpmail.product/[1.0.1,1.0.1]] can be satisfied.

Looks like the director is determined on installing 1.0.1 next to 1.0.0
instead of updating the old version that he finds. I have read in some p2
code (can't remember where anymore..) that when an old version of an IU is
found, an update command is translated into an uninstall of the old version
and an install of the new one. I was hoping this was the case here too.

(another problem that was printed here was:
!MESSAGE No solution found because the problem in
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\p2Encoding11372.opb is unsatisfiable.
this file apparently gets deleted after the director process ends so this is
not very useful)

So is there a way to use a command line part of p2 to perform updates, or is
the UI the only way to update?

Thanks,
Tim
Re: [p2] headless update [message #111722 is a reply to message #111644] Tue, 10 June 2008 22:02 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
Hi,

> !MESSAGE Cannot find a solution where both Match[requiredCapability:
> org.eclipse.equinox.p2.iu/rcpmail.product/[1.0.0,1.0.0]] and
> Match[requiredCapability:
> org.eclipse.equinox.p2.iu/rcpmail.product/[1.0.1,1.0.1]] can be satisfied.

This vaguely reminds me of
https://bugs.eclipse.org/bugs/show_bug.cgi?id=235000
See specifically the messages in comment 2.

Comment 5 explains that p2 requires the meta data of already installed
features to be accessible at the time when changing the installation.
(Although the scenario in bug 235000 is different from yours).

Perhaps in your case the director just couldn't access the meta data
(= content.xml) of your prior version 1.0.0?
Do you accumulate meta data (using -append)?

Stephan
Re: [p2] headless update [message #111837 is a reply to message #111644] Fri, 13 June 2008 01:15 Go to previous message
Pascal Rapicault is currently offline Pascal RapicaultFriend
Messages: 333
Registered: July 2009
Location: Ottawa
Senior Member
The "smart" detecting that what you are asking is an update instead of an
install currently leaves in the UI.
There are plans to try to move it closer to the director / planner.
If you know for sure that something is an update of something else, then you
simply need to create a ProfileChangeRequest that remove the old version and
add the new one.

To know what are the updates available you can use IPlanner#updatesFor().

HTH,

PaScaL

"Tim Fooy" <tim_fooy@inventivedesigners.com> wrote in message
news:g2lrip$7gb$1@build.eclipse.org...
> Hi all,
> We are working on using p2 as the new installation/update system for our
> product, using it in our installer. This means that we need to be able to
> call it on headless systems, not using any UI to install or update. We
> are using the director application (why is it not included in the agent?)
> to do this. So far we have been able to use p2 to install the sample RCP
> mail application and get it to work (after some manual tweaking of the
> install..), so the director works well in a headless setting.
> However I cannot find anything about updating using the director or maybe
> some other application? When I re-export the mail application with a
> higher version number for both the product and the plugin, and then use
> the director to install it on top of the first install of the mail
> application, then I get the following error:
>
> !MESSAGE Cannot find a solution where both Match[requiredCapability:
> org.eclipse.equinox.p2.iu/rcpmail.product/[1.0.0,1.0.0]] and
> Match[requiredCapability:
> org.eclipse.equinox.p2.iu/rcpmail.product/[1.0.1,1.0.1]] can be satisfied.
>
> Looks like the director is determined on installing 1.0.1 next to 1.0.0
> instead of updating the old version that he finds. I have read in some p2
> code (can't remember where anymore..) that when an old version of an IU is
> found, an update command is translated into an uninstall of the old
> version and an install of the new one. I was hoping this was the case
> here too.
>
> (another problem that was printed here was:
> !MESSAGE No solution found because the problem in
> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\p2Encoding11372.opb is unsatisfiable.
> this file apparently gets deleted after the director process ends so this
> is not very useful)
>
> So is there a way to use a command line part of p2 to perform updates, or
> is the UI the only way to update?
>
> Thanks,
> Tim
>
Previous Topic:Running Jetty as a Workbench service
Next Topic:p2 fails when mirror site does not have requested resources
Goto Forum:
  


Current Time: Thu Apr 25 11:57:35 GMT 2024

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

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

Back to the top