Bug 273200 - [director] Support to script the director application
Summary: [director] Support to script the director application
Status: RESOLVED WONTFIX
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.5   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2009-04-22 03:38 EDT by Tom Hofmann CLA
Modified: 2019-06-07 04:31 EDT (History)
4 users (show)

See Also:


Attachments
A P2 director application ant task (4.39 KB, application/octet-stream)
2009-08-20 08:21 EDT, Michal Ruzicka CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Hofmann CLA 2009-04-22 03:38:44 EDT
3.5M6

The P2 director application works, but could use some usability improvement. The following ideas stem from my experience doing three different tasks:

 - automated building
 - updating an eclipse-based server from outside when a new version becomes available
 - installing and provisioning from the command line

Everything is meant as suggestion for after 3.5 - some may already exist but only lack documentation...

General:

a) Please provide a shortcut for co-located repositories (-repository <repo> equivalents to -metadataRepository <repo> -artifactRepository <repo>).

b) allow to specify several commands, IUs and repositories in one command. Alternatively and probably more manageable: define a script format to feed to the director application, where the script would state the repositories, IUs to update, remove, install etc:

 app -f script.txt -target <target>
 
--- script.txt:--
repository http://example.com/repo
remove <iu>
update <iu>
install <iu>

-----------------

Install:

c) allow more control over which repositories will be contacted (see also bug 273195 and bug 268138)

Update:

d) updating is not well supported, as one has to uninstall the previous version first. However, there is no easy way to find out the previous version. Provide something like

 app -updateIU [<iu>] [-repository <repo>] -target <target>

to update an installation or a certain IU.

Documentation:

e) -uninstallIU is not documented on http://wiki.eclipse.org/Equinox_p2_director_application
Comment 1 Pascal Rapicault CLA 2009-04-23 22:39:58 EDT
I eluded to such a solution in bug #268194 but this is not what is being explored there for now. 
For future reference, This would have to tie in with the concept of a response file which is a way to drive an installers in a silent mode.
Comment 2 Michal Ruzicka CLA 2009-08-20 08:21:40 EDT
Created attachment 145115 [details]
A P2 director application ant task

A simple ant task to invoke the new P2 director application from an ant script.
NOTE that the P2 bundles restart related code is probably unnecessary when run against the P2 director application which already contains the fix for bug #285235.
Comment 3 Andrew Niefer CLA 2010-02-01 16:52:15 EST
There is currently a DirectorTask class in the director.app bundle.  It implements a <p2.director> task and is used by pde.build starting in M5 for bug 294334.

PDE/Build only uses this to perform installs, changes are likely needed to perform any other operations currently supported by the command line director application.
Comment 4 Pascal Rapicault CLA 2010-03-12 21:47:30 EST
At this point the only thing that did not get done here is the support for scripting and I don't think this will happen at this point unless Tom you want to try to provide a patch. The code is in the org.eclipse.equinox.p2.director.app bundle and is relatively simple.
Comment 5 Eclipse Genie CLA 2019-06-06 17:35:15 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.