Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 286876

Summary: [prov] Director mangles local URIs for -repository
Product: [Eclipse Project] Equinox Reporter: Daniel Jacobowitz <dan>
Component: p2Assignee: P2 Inbox <equinox.p2-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.5   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Daniel Jacobowitz CLA 2009-08-17 17:25:58 EDT
Build ID: 20090619-0625

Steps To Reproduce:
Create a zipped repository named A,B.zip and try to find a way to install from it using the director.


More information:
The director uses StringHelper.getArrayFromString to split the argument to -repository (-metadataRepository, -artifactRepository) on commas.  Then it uses URIUtil.fromString, which does more substring operations to create a URI object.

Suppose you have a path with spaces (very common on Windows).  You have to specify -repository "jar:file:/C:/Documents and Settings/test.zip!/" instead of "jar:file:/C:/Documents%20and%20Settings/test.zip!/" because URIUtil will escape the % sign.  So you can not put just any valid URI on the director's command line.

I discovered this trying to create jar:file URIs to temporary files during our installer.  We have to provide an unescaped path on the command line.  If the temporary directory happened to contain a comma, this would fail.
Comment 1 Daniel Jacobowitz CLA 2010-08-16 23:03:20 EDT
This is no longer true in Helios.  See bug 291405.

*** This bug has been marked as a duplicate of bug 291405 ***