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

Bug 357506

Summary: [documentation] Director won't handle comma separated entries on Windows
Product: z_Archived Reporter: Christian Pontesegger <christian.pontesegger>
Component: BuckminsterAssignee: buckminster.core-inbox <buckminster.core-inbox>
Status: REOPENED --- QA Contact:
Severity: normal    
Priority: P3 CC: dj.houghton, pascal, thomas
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Christian Pontesegger CLA 2011-09-13 10:44:31 EDT
Build Identifier: I20110613-1736

The installIU parameter of the director application is described the following way:

-installIU: a comma separated list of IUs to install. Each entry in the list is in the form <id> [ '/' <version> ].

When trying to install a product and a feature by passing

-i productID,myfeature.feature.group

I get an error

!ENTRY org.eclipse.equinox.p2.core 4 0 2011-09-13 16:38:38.323
!MESSAGE Unknown option myfeature.feature.group. Use -help for a list of
known options.

I am able to install both IUs one after the other. It also works when passing

-i productID -i myfeature.feature.group



Reproducible: Always
Comment 1 DJ Houghton CLA 2011-09-13 11:37:19 EDT
This works for me both in Eclipse 3.7 and in the latest builds. Here is the command-line that I am using:

./eclipse -application org.eclipse.equinox.p2.director -nosplash 
-r file:///Users/equinox/export.filters 
-i fff.feature.group,fff.macosx.feature.group

Are there additional command-line arguments that you have which might be causing problems?
Comment 2 Christian Pontesegger CLA 2011-09-14 02:29:50 EDT
(In reply to comment #1)
> Are there additional command-line arguments that you have which might be
> causing problems?

My full commandline is:

director -consoleLog -r "file:///C:/Build/UpdateSite"
 -d "C:/Build/Example RCP installed" -i com.example.myfeature.feature.group,com.
example.rcp.core.myproduct -p2.os win32 -p2.ws win32 -p2.arch x86

I tried moving the -i parameter to the end, but still see the same error
Comment 3 Christian Pontesegger CLA 2011-09-14 02:36:18 EDT
(In reply to comment #1)
> This works for me both in Eclipse 3.7 and in the latest builds. Here is the
> command-line that I am using:
> 
> ./eclipse -application org.eclipse.equinox.p2.director -nosplash 
> -r file:///Users/equinox/export.filters 
> -i fff.feature.group,fff.macosx.feature.group

Should have read your post more carefully. I am using a standalone director and did not call eclipse with director app.

The standalone director uses a batch file  to create the command line args for the director app. When prefixing the last line of the batch file with an echo I get:

Command:
C:\UserData\Build\director>director -consoleLog -r file:///C:/Build/UpdateSite -
d C:/Build/ExampleRCPinstalled -p2.os win32 -p2.ws win32 -p2.arch x86 -i com.exa
mple.rcp.core.myproduct,com.example.myfeature.feature.group

Echo output:
java  -jar "C:\UserData\Build\director\plugins\org.eclipse.equinox.launcher_1.2.
0.v20110502.jar"  -consoleLog -r file:///C:/Build/UpdateSite -d C:/Build/Example
RCPinstalled -p2.os win32 -p2.ws win32 -p2.arch x86 -i com.example.rcp.core.mypr
oduct com.example.myfeature.feature.group

which clearly explains why it is not working.

When using eclipse as launcher it works as expected
Comment 4 DJ Houghton CLA 2011-09-14 08:02:32 EDT
Thanks for double-checking.
Closing.
Comment 5 Christian Pontesegger CLA 2011-09-14 13:28:00 EDT
(In reply to comment #4)
> Thanks for double-checking.
> Closing.

The standalone director app seems to be an official download from eclipse:

http://www.eclipse.org/downloads/download.php?file=/tools/buckminster/products/director_latest.zip

... and it's not working as expected. So this bug might be moved to buckminster but in my opinion it should be fixed, not closed.
Comment 6 DJ Houghton CLA 2011-09-14 13:33:21 EDT
Yep, I'll move it to Buckminster. I had though the stand-alone app was a script that you had created and didn't realize that it was provided by an Eclipse.org project.
Comment 7 Thomas Hallgren CLA 2011-09-14 16:19:54 EDT
As this is a windows problem, I would very much appreciate a patch to the .bat file.
Comment 8 Christian Pontesegger CLA 2011-09-16 05:17:10 EDT
(In reply to comment #7)
> As this is a windows problem, I would very much appreciate a patch to the .bat
> file.

Cannot come up with a patch. Seems like windows treats a comma as a natural parameter delimiter.

But what works is quoting the list of IUs. So my original parameter need to be modified to

-i "productID,myfeature.feature.group"

to make it work.

If it cannot be patched otherwise maybe this could be documented so that other do not run into this anymore.
Comment 9 Thomas Hallgren CLA 2011-09-16 05:32:53 EDT
Agree. I'll move this to documentation.

In the docs about headless invocation there needs to be a special note for windows users that comma separated lists must be quoted.