Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 263491 - Status not properly propagated when error occurs and the artifacts needs to be unzipped
Summary: Status not properly propagated when error occurs and the artifacts needs to b...
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M6   Edit
Assignee: Matthew Piggott CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-03 12:09 EST by James D. Miles CLA
Modified: 2009-04-01 17:57 EDT (History)
1 user (show)

See Also:


Attachments
error log contianing exception during install (4.79 KB, text/plain)
2009-02-03 12:09 EST, James D. Miles CLA
no flags Details
zip of HelloWorldSite used (19.03 KB, application/octet-stream)
2009-02-03 12:14 EST, James D. Miles CLA
no flags Details
Pass status information to IStateful OutputStream in MirrorRequest (1.17 KB, patch)
2009-02-06 16:13 EST, Matthew Piggott CLA
no flags Details | Diff
Pass status information to IStateful OutputStream in MirrorRequest (2.40 KB, patch)
2009-02-06 16:47 EST, Matthew Piggott CLA
pascal: iplog+
Details | Diff
Updated error message (2.23 KB, text/plain)
2009-02-06 16:58 EST, Matthew Piggott CLA
no flags Details
Test case for invalid zip error in MirrorRequest (5.36 KB, patch)
2009-02-11 09:37 EST, Matthew Piggott CLA
pascal: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James D. Miles CLA 2009-02-03 12:09:52 EST
Created attachment 124570 [details]
error log contianing exception during install

Build ID:  I20090129-1800

Steps To Reproduce:
1. Unzip 350M5 to C:\35work\M5_RUNNER\rcp 
2. Verify can launch successfully with.\eclipse.exe -data C:\35work\M5_RUNNER\workspace -configuration C:\35work\M5_RUNNER\workspace\.config -debug -console 
3. Install HelloWorld from script using director. Command =
.\eclipse.exe -data C:\35work\M5_RUNNER\workspace -configuration C:\35work\M5_RUNNER\workspace\.config -debug -console -application org.eclipse.equinox.p2.director.app.application -metadataRepository file:/C:/ctempP2/HelloWorldSite/ -artifactRepository file:/C:/ctempP2/HelloWorldSite/ -installIU HelloWorldFeature.feature.group -version 1.0.0 
4. Installation fails with exception. Log is attached.


More information:
If the site has been previously installed with p2 UI and then uninstalled the command in step 3 will pass. This is likely because the site has been installed into the bundle pool and has not been garbage collected.
Comment 1 James D. Miles CLA 2009-02-03 12:14:21 EST
Created attachment 124571 [details]
zip of HelloWorldSite used
Comment 2 Matthew Piggott CLA 2009-02-06 13:44:54 EST
I've been taking a look at this, and the cause of the the exception is that the service to copy the file from the local repository isn't found, as we've already opened the output stream we attempt to close it which automatically attempts to unzip but fails as the file is empty.

Interestingly this problem does not occur if -configuration is not specified in step-2, so something is (not) being generated which is resulting in the service not existing.  Though an attempt to unzip an unsuccessful transfer shouldn't be tried.
Comment 3 Matthew Piggott CLA 2009-02-06 16:13:31 EST
Created attachment 124999 [details]
Pass status information to IStateful OutputStream in MirrorRequest

If the OutputStream implements IStateful then merge its' status with that from the attempt to acquire the artifact.  This should allow IStatus aware OutputStreams such as SimpleArtifactRepository's ArtifactOutputStreamTest to behave appropriately.
Comment 4 Matthew Piggott CLA 2009-02-06 16:47:22 EST
Created attachment 125005 [details]
 Pass status information to IStateful OutputStream in MirrorRequest

Slight update to correct an issue with a test case
Comment 5 Matthew Piggott CLA 2009-02-06 16:58:44 EST
Created attachment 125007 [details]
Updated error message
Comment 6 Matthew Piggott CLA 2009-02-09 16:54:05 EST
The cause of the failed transfer is that the ECF bundle is not started so the local transfer fails with "Transport initialization error". Bug #262660 also runs into this.
Comment 7 Matthew Piggott CLA 2009-02-11 09:37:15 EST
Created attachment 125389 [details]
Test case for invalid zip error in MirrorRequest

Also required is an empty file: testData/artifactRepo/emptyJarRepo/features/HelloWorldFeature_1.0.0.jar

Create patch was unable to indicate this in the .patch file.
Comment 8 Pascal Rapicault CLA 2009-02-11 13:17:11 EST
Patch released in HEAD
Comment 9 James D. Miles CLA 2009-04-01 17:57:20 EDT
Verified fixed in M6