Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » P2 » Listing installation units in p2
Listing installation units in p2 [message #721589] Fri, 02 September 2011 08:25 Go to next message
Eclipse UserFriend
Originally posted by:

We are trying to understand what is going on during our p2 installation
of a feature, more specifically we want to use the -list option and we
are trying it so (without having yet installed the feature of interest):

app.exe -noSplash -application org.eclipse.equinox.p2.director -list
-repository file://C:\Users\BlaBlub\something

where app.exe is the executable of our RCP program and
file://C:\Users\BlaBlub\something points to a directory that again
contains a directory eclipse which again contains a plugins and a
features sub directory. We always get no result and have checked that
this execution returns with result 0.

Could anyone shed some light on this?

Let me add that if we adapt the above command such that we perform the
actual feature installation as in

app.exe -noSplash -application org.eclipse.equinox.p2.director
-installIU somefeature.feature.group -repository
file://C:\Users\BlaBlub\something

we get also a 0 result and we find them installed in our p2 repository.
We notice though, that the second step additionally creates a
(non-empty) file eclipse.ini.ignored: What is the purpose of this file?
(I could not find any helpful result hits during a google search for the
name)

Thanks & Greetings from Bremen,

Daniel Krügler
Re: Listing installation units in p2 [message #723381 is a reply to message #721589] Thu, 08 September 2011 12:43 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 242
Registered: July 2009
Senior Member
Daniel,

The normal Windows executable does not open a console, so whatever output is being generated is being sent to nowhere. You need to use the 'eclipsec.exe' (note trailing 'c') to get any output.

Brian,
Re: Listing installation units in p2 [message #723389 is a reply to message #723381] Thu, 08 September 2011 12:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by:

On 2011-09-08 14:43, Brian de Alwis wrote:
> Daniel,
>
> The normal Windows executable does not open a console, so whatever
> output is being generated is being sent to nowhere. You need to use the
> 'eclipsec.exe' (note trailing 'c') to get any output.

Thanks for your reply Brian, but this confuses me a bit. It was my
understanding that I can invoke these commands from *every*
Eclipse-based product. Quoting from

http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/p2_director.html

"The director application is a command line tool for installing
additional software or uninstalling software from an Eclipse-based product."

Are you trying to explain to me that we cannot do those commands
(including feature installation and the like) with our just installed
RCP product (which is indeed a Windows-based application, no console
program)? It would seem not acceptable to have some additional
eclipsec.exe including its dependencies part of our own product setup
just to realize an p2 director installation/uninstallation. Or is it
just so, that the expected console result is written to some file?

Thanks & Greetings from Bremen,

Daniel Krügler
Re: Listing installation units in p2 [message #723631 is a reply to message #723389] Fri, 09 September 2011 02:42 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 242
Registered: July 2009
Senior Member
Quote:
Are you trying to explain to me that we cannot do those commands
(including feature installation and the like) with our just installed
RCP product (which is indeed a Windows-based application, no console
program)? It would seem not acceptable to have some additional
eclipsec.exe including its dependencies part of our own product setup
just to realize an p2 director installation/uninstallation. Or is it
just so, that the expected console result is written to some file?
You can invoke these p2 apps, but their output goes to stdout. The eclipse.exe binary is a windowed application and won't show output sent to stdout.

As Andrew Niefer put it elsewhere:

Quote:
eclipse/eclipsec is analogous to javaw/java.  Eclipsec.exe is linked as a console application so that the OS will allocate a console for us.  This executable does not automatically add any arguments, so you still need to specify -console, -consoleLog, etc.


Are you invoking the director from your program? Don't do this: look at the p2 APIs, See the following link for a starter:

http://wiki.eclipse.org/Equinox/p2/Adding_Self-Update_to_an_RCP_Application

Brian.
Re: Listing installation units in p2 [message #723759 is a reply to message #723631] Fri, 09 September 2011 11:22 Go to previous message
Eclipse UserFriend
Originally posted by:

On 2011-09-09 04:42, Brian de Alwis wrote:
> Quote:
>> Are you trying to explain to me that we cannot do those commands
>> (including feature installation and the like) with our just installed
>> RCP product (which is indeed a Windows-based application, no console
>> program)? It would seem not acceptable to have some additional
>> eclipsec.exe including its dependencies part of our own product setup
>> just to realize an p2 director installation/uninstallation. Or is it
>> just so, that the expected console result is written to some file?
> You can invoke these p2 apps, but their output goes to stdout. The
> eclipse.exe binary is a windowed application and won't show output sent
> to stdout.
> As Andrew Niefer put it
> http://dev.eclipse.org/mhonarc/lists/eclipse-dev/msg07752.html:

Thanks for the link, I have read this and the next link pointed to by
Andrew Niefer, but this does not answer the question to me, what the
requirements are for eclipsec.exe. Does it contain all the dependencies
it needs? Do we really have to copy this executable to out setup program
just to realize an p2 installation/uninstallation of a feature to an
existing RCP application? I hope we could do that with our RCP app (and
it seems already to work except for the missing output and for the
incomplete uninstall). Is there some documented way to create the
corresponding console version form of my own RCP application for this
purpose?

> Quote:
>> eclipse/eclipsec is analogous to javaw/java. Eclipsec.exe is linked
>> as a console application so that the OS will allocate a console for
>> us. This executable does not automatically add any arguments, so you
>> still need to specify -console, -consoleLog, etc.
>
>
> Are you invoking the director from your program? Don't do this: look at
> the p2 APIs, See the following link for a starter:
>
> http://wiki.eclipse.org/Equinox/p2/Adding_Self-Update_to_an_RCP_Application

I'm not sure what you mean by "invoking the director from your program".
This won't be done by the user nor from the running RCP application. We
don't integrate Eclipse update mechanisms via the UI. We only want to
install or uninstall an optional feature to an existing RCP installation
with p2 structure via our setup program using the console commands. We
expected that this can be done via the RCP.exe and in fact it seems to
work partially, as described above. What we didn't do was to add the part

"-profileProperties org.eclipse.update.install.features=true"

to this command yet (I haven't found anywhere a reason why this is
necessary to do).

Thanks for your replies so far, even though I have a slightly bitter
aftertaste realizing the complexity of a seemingly simple thing such as
a feature install or uninstall to an existing p2 RCP application.

- Daniel Krügler
Previous Topic:Uninstall feature followed by reinstall older feature doesn't work
Next Topic:Artifact and metadata repository manager are null
Goto Forum:
  


Current Time: Fri Apr 19 05:52:22 GMT 2024

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

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

Back to the top