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

Bug 276589

Summary: Could the p2.director support installing multiple IUs in a single operation?
Product: [Eclipse Project] Equinox Reporter: Nick Boldt <nboldt>
Component: p2Assignee: P2 Inbox <equinox.p2-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: dash.commonbuilder-inbox, thomas
Version: 3.5   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on:    
Bug Blocks: 273518    
Attachments:
Description Flags
director app syntax example none

Description Nick Boldt CLA 2009-05-16 02:07:09 EDT
Created attachment 136094 [details]
director app syntax example

With the p2 Install UI, you can select multiple IUs (or feature.groups) to install at the same time, such as the EMF and GEF runtimes, upon which you can then install VE (or do all three at once).

With the director, I tried this and can't figure out the syntax to do so, if it's even possible.

--

I've tried separating multiple IUs with a space, but the second one is simply ignored.

Using comma, semi-colon, colon, and space (with quotes) fails because the app doesn't recognize the input as a list. With:

-installIU org.eclipse.emf.feature.group,org.eclipse.gef.feature.group
-installIU org.eclipse.emf.feature.group\;org.eclipse.gef.feature.group
-installIU org.eclipse.emf.feature.group:org.eclipse.gef.feature.group
-installIU "org.eclipse.emf.feature.group org.eclipse.gef.feature.group"

I get:

The installable unit org.eclipse.emf.feature.group,org.eclipse.gef.feature.group has not been found.
  etc.

If I do:

-installIU org.eclipse.emf.feature.group -installIU org.eclipse.gef.feature.group

I get:

org.eclipse.core.runtime.CoreException: Cannot execute both -installIU and -installIU in one invocation

So... there's apparently no way to do this... yet. Could there be?

I've attached the full commandline syntax for the director app as I used it. In the /tmp/build/N200905160131-VE/eclipse is a copy of Eclipse 3.4.2; into that same folder I'm installing EMF and GEF so I can then headlessly build VE.

--

If you're wondering what the motivation is here, I'm retooling the Athena common builder such that instead of SDKs and runtime zips as input which necessitate downloading more than is needed ...

dependencyURLs=http://download.eclipse.org/eclipse/downloads/drops/R-3.4.2-200902111700/eclipse-SDK-3.4.2-linux-gtk.tar.gz,\
http://download.eclipse.org/modeling/emf/emf/downloads/drops/2.4.2/R200902171115/emf-runtime-2.4.2.zip,\
http://download.eclipse.org/tools/gef/downloads/drops/3.4.2/R200902171642/GEF-runtime-3.4.2.zip

... users can simply say:

dependencyURLs=http://download.eclipse.org/eclipse/downloads/drops/R-3.4.2-200902111700/eclipse-SDK-3.4.2-linux-gtk.tar.gz
repositoryURLs=http://download.eclipse.org/releases/ganymede/
featureIDsToInstall=org.eclipse.emf,org.eclipse.gef
 - or -
repositoryURLs=http://download.eclipse.org/modeling/emf/updates/releases/,http://download.eclipse.org/tools/gef/updates/releases/
featureIDsToInstall=org.eclipse.emf,org.eclipse.gef

and set up their build's runtime environment using the director instead of the brute-force "unpack into dropins/" approach we all wish would go away. :)
Comment 1 Thomas Hallgren CLA 2009-05-16 02:15:12 EDT
(In reply to comment #0)
> Using comma, semi-colon, colon, and space (with quotes) fails because the app
> doesn't recognize the input as a list. With:
> 
You can always repeat the argument, i.e.:

-installIU org.eclipse.emf.feature.group -installIU org.eclipse.gef.feature.group

You can also one or more -installIU with one or more -uninstallIU.

The comma separated list is also supposed to work (for IU's and repositories). Apparently it doesn't. I'll check what's going on. 
Comment 2 Nick Boldt CLA 2009-05-16 02:32:31 EDT
(In reply to comment #1)
> You can always repeat the argument, i.e.:
> -installIU org.eclipse.emf.feature.group -installIU
> org.eclipse.gef.feature.group

Tried that, and I get this:

org.eclipse.core.runtime.CoreException: Cannot execute both -installIU and
-installIU in one invocation
Comment 3 Thomas Hallgren CLA 2009-05-16 02:48:49 EDT
It sounds like you're still using the old app (which would explain why comma-separated list doesn't work). In order to preserve backward compatibility we changed the actual name of the application so the old one is still there and intact (should give you a deprecated message using the last couple of I-builds).

Use -application org.eclipse.equinox.p2.director

I.e. loose the '.app.application' that used to be there. Verify using the new -help option.
Comment 4 Nick Boldt CLA 2009-05-17 03:12:49 EDT
(In reply to comment #3)
> It sounds like you're still using the old app.
> Use -application org.eclipse.equinox.p2.director

Verified. Multi-IU installation works great w/ the new app in M7. Closing.