Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forumsp2 director: Any success/failure tests?
https://www.eclipse.org/forums/index.php/mv/msg/201246/642717/#msg_642717
Therefore I retry on this group.]
Our installation program is supposed to allow installation of additional
plugins to our RCP application using the p2 director as described in
1) How can we test that the installation succeeds?
2) There exists the parameter -verifyOnly described as
"only verify that the actions can be performed. Don't actually install
or remove anything."
First, I observe that calling with this parameter changes *something*,
e.g. there are new directories in the configuration folder after that.
Second, the same question applies to this call: How can we recognice a
success?
I observe that on failure a .log file is produced in the configuration
directory, but this seems not to be documented (AFAIK). Are we really
supposed to search for such a log file as indicator?
Thanks & Greetings from Bremen,
Daniel Krügler]]>Daniel Krügler2010-12-02T13:16:24-00:00Re: p2 director: Any success/failure tests?
https://www.eclipse.org/forums/index.php/mv/msg/201246/642808/#msg_642808
that's more reliable to check on linux than on all platforms.
You can use the director call with your application profile and -list to
check if it was installed. ex:
According to our installation guys it doesn't (we have a Windows
platform). Even worse: It seems that calling the director does not
invoke synchronously: The installation cannot just delete temporary
files immediately after the invocation, because the process may still
need to access the files. This makes it hard to integrate the director
into our installation process.
> You can use the director call with your application profile and -list to
> check if it was installed. ex:
>
> eclipse/eclipse -noSplash \
> -application org.eclipse.equinox.p2.director \
> -repository \
> file:$(pwd)/eclipse/p2/org.eclipse.equinox.p2.engine/profile Registry/SDKProfile.profile
> \
> -list
The description of -list only says:
"lists all IU's found in the given repositories in a property like
format. IUs can optionally be listed. Each entry in the list is in the
form <id> [ '/' <version> ]."
This does not sound as if this would be useful for a validation. In
fact, I don't want that the installer is required to know all IU's that
were installed (this is only interesting for an after-the-fact
analysis), but I want to get feedback, whether the installation has
succeeded or not. Details of failures are relevant after this (and one
could try to search for the most recently written log file), but the
lack of a general OK/ERROR feedback from the director is very bad in a
multi-step installation that needs to ensure that each step (among which
the director call is only one) has succeeded or not.
Thanks & Greetings from Bremen,
Daniel Krügler]]>Daniel Krügler2010-12-03T09:00:08-00:00Re: p2 director: Any success/failure tests?
https://www.eclipse.org/forums/index.php/mv/msg/201246/643308/#msg_643308
> On 12/2/2010 19:30, Paul Webster wrote:
>> Wouldn't the director return a "failed" exit code if it fails? Although
>> that's more reliable to check on linux than on all platforms.
>
> According to our installation guys it doesn't (we have a Windows
> platform). Even worse: It seems that calling the director does not
> invoke synchronously: The installation cannot just delete temporary
> files immediately after the invocation, because the process may still
> need to access the files. This makes it hard to integrate the director
> into our installation process.
that's probably because by default, eclipse.exe calls javaw.exe. That's
not what you want (maybe call it with -vm c:\whatever\bin\java.exe
instead of javaw.exe).
If you were to run java.exe -jar
eclipse\plugins\org.eclipse.equinox.launcher_1.2.0.v20101119 .jar
-application org.eclipse.equinox.p2.director <rest of command>
and it doesn't return non-0 on fail, open a bug against RT Equinox
Framework (or there might be a launcher component now).
PW
--
Paul Webster http://wiki.eclipse.org/Platform_Command_Framework http://wiki.eclipse.org/Command_Core_Expressions http://wiki.eclipse.org/Platform_Expression_Framework http://wiki.eclipse.org/Menu_Contributions http://wiki.eclipse.org/Menus_Extension_Mapping http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm]]>Paul Webster2010-12-06T13:03:22-00:00Re: p2 director: Any success/failure tests?
https://www.eclipse.org/forums/index.php/mv/msg/201246/643357/#msg_643357
> Daniel Krügler wrote:
>> On 12/2/2010 19:30, Paul Webster wrote:
>>> Wouldn't the director return a "failed" exit code if it fails? Although
>>> that's more reliable to check on linux than on all platforms.
>>
>> According to our installation guys it doesn't (we have a Windows
>> platform). Even worse: It seems that calling the director does not
>> invoke synchronously: The installation cannot just delete temporary
>> files immediately after the invocation, because the process may still
>> need to access the files. This makes it hard to integrate the director
>> into our installation process.
>
> that's probably because by default, eclipse.exe calls javaw.exe. That's
> not what you want (maybe call it with -vm c:\whatever\bin\java.exe
> instead of javaw.exe).
>
> If you were to run java.exe -jar
> eclipse\plugins\org.eclipse.equinox.launcher_1.2.0.v20101119 .jar
> -application org.eclipse.equinox.p2.director <rest of command>
Thanks Paul, this sounds like a brilliant idea - we will test this
approach and give feedback to the group!