Bug 272400 - Need better director error reporting on product export
Summary: Need better director error reporting on product export
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M7   Edit
Assignee: Chris Aniszczyk CLA
QA Contact:
URL:
Whiteboard:
Keywords: polish
Depends on:
Blocks:
 
Reported: 2009-04-15 17:20 EDT by Andrew Niefer CLA
Modified: 2009-04-27 14:27 EDT (History)
1 user (show)

See Also:


Attachments
First hack (42.28 KB, patch)
2009-04-15 18:37 EDT, Andrew Niefer CLA
no flags Details | Diff
updated patch (3.64 KB, patch)
2009-04-17 10:42 EDT, Andrew Niefer CLA
no flags Details | Diff
updated patch (38.42 KB, patch)
2009-04-27 13:27 EDT, Andrew Niefer CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Niefer CLA 2009-04-15 17:20:16 EDT
If during product export there is a problem running the director, then we will get an error message that essentially says "java returned 13".

We should either parse the build output from the BuildListener, or log the director results using "p2.director.log" (see bug 271386) and then parse that log file.
Comment 1 Andrew Niefer CLA 2009-04-15 18:37:54 EDT
Created attachment 131995 [details]
First hack

Attached is a first pass at getting the error message.
This ends up looking something like:
Installation failed.
Application failed, log file location: C:\Dev\Platform\Workspaces\PROV\.metadata\.plugins\org.eclipse.pde.core\New_configuration\1239834825609.log

!ENTRY org.eclipse.equinox.p2.director 4 1 2009-04-15 18:33:48.343
!MESSAGE Cannot complete the install because one or more required items could not be found.
!SUBENTRY 1 org.eclipse.equinox.p2.director 4 0 2009-04-15 18:33:48.343
!MESSAGE Software being installed: com.example.rcpapp.product 1.0.0
!SUBENTRY 1 org.eclipse.equinox.p2.director 4 0 2009-04-15 18:33:48.343
!MESSAGE Missing requirement: com.example.rcpapp.product 1.0.0 requires 'foobar bar [1.0.0]' but it could not be found


It would be nice if we could parse this into a proper multi-status which removes the !MESSAGE, !ENTRY and !SUBENTRY parts.
Comment 2 Andrew Niefer CLA 2009-04-15 18:38:56 EDT
BTW, to provoke an error, you can create a p2.inf file beside the .product file and add something like:
requires.1.namespace=foobar
requires.1.name=bar
requires.1.range=[1.0.0,1.0.0]
requires.1.greedy=true
Comment 3 Andrew Niefer CLA 2009-04-17 10:42:28 EDT
Created attachment 132245 [details]
updated patch

Patch is the same, just updated to match latest.

Chris, what do you think of this?
Comment 4 Andrew Niefer CLA 2009-04-17 10:48:41 EDT
Comment on attachment 132245 [details]
updated patch

Oops, sorry, this is obsolete.  There were changes in build that make this not work.

We should instead set "p2.director.log" and then point the user at that log file or read it in.
Comment 5 Chris Aniszczyk CLA 2009-04-17 11:15:21 EDT
I'm willing to look at this if you have an updated patch ;)

I think pointing people to a log is fine, better than nothing.
Comment 6 Andrew Niefer CLA 2009-04-27 13:27:12 EDT
Created attachment 133401 [details]
updated patch

Here is a new patch Chris, it results in error messages like:

 Cannot complete the install because one or more required items could not be found.
   Software being installed: com.example.rcpapp.product 1.0.0
   Missing requirement: com.example.rcpapp.product 1.0.0 requires 'org.eclipse.rcp.feature.group [3.5.0.v20090407-9RA-FqhFsGODBwZvv0XSJ17]' but it could not be found
Comment 7 Chris Aniszczyk CLA 2009-04-27 13:30:54 EDT
will review
Comment 8 Chris Aniszczyk CLA 2009-04-27 14:27:08 EDT
done.

> 20090427

A bit hackish but we don't have a better option at the moment I think.