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

Bug 37688

Summary: [plan item] Provide update manager operations API
Product: [Eclipse Project] Platform Reporter: Jim des Rivieres <jeem>
Component: Update (deprecated - use Eclipse>Equinox>p2)Assignee: Dorian Birsan <birsan>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P4 CC: celek, danrubel, jasc, manahan, thatnitind, voutsin
Version: 2.1Keywords: plan
Target Milestone: 3.0 M3   
Hardware: All   
OS: All   
Whiteboard:

Description Jim des Rivieres CLA 2003-05-15 11:13:41 EDT
Provide update manager operations API. Most of the logic currently in the 
update manager UI should be pushed into a new operations layer. This 
operations layer would be to Update Core what JFace is to SWT. The APIs would 
enable update tasks to run headless, and would enable updates to be scripted. 
[Platform Update] [Theme: Rich client platform]
Comment 1 Dejan Glozic CLA 2003-06-23 12:14:59 EDT
A requirement for the command line update from the mailing list:

* Impact Analysis (better integration with native installers basically) 
  - sometimes native installers may want to remove function from eclipse which 
they 
    laid down. They need a way to ask eclipse if it is 
   a) ok to add or remove a feature 
   b) if it isn't ok some information that could be provided to the user to 
assist 
      in making the decision regarding uninstall. 

In the current command line support this would translate into an argument 
(e.g. -simulate or -test) that would run validation step only and return 0 if 
the validation is OK or some error code if issues are found.
In the former case, detailed report should be given (recursive dumping of 
multi-status objects to stderr). This argument would be applicable to all the
operations that cause configuration changes (i.e. install, uninstall, enable,
disable).
Comment 2 Dorian Birsan CLA 2003-06-23 13:04:39 EDT
The eclipse launcher allows running an IPlatformRunnable object, but there is 
no concept of return code, so theoretically, we the standalone update tool 
cannot return any kind of error codes.

Perhaps we should either generate output to some predefined (or user supplied) 
file, or just output to stderr.
Comment 3 Dorian Birsan CLA 2003-06-23 14:26:40 EDT
It looks like if the return Object is of type Integer, that value would 
actually be returned.
So, for the time being, the command line update application would return a 
status code of:
0 for a successful operation
1 for unsuccessul operation

More error return codes can be added if needed.
The current command line syntax is described at
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-update-
home/doc/working/documentation/standalone_update.html
Comment 4 Dorian Birsan CLA 2003-06-25 19:45:01 EDT
*** Bug 39347 has been marked as a duplicate of this bug. ***
Comment 5 Dorian Birsan CLA 2003-07-22 09:51:38 EDT
Just a note for those who picked up M2 and are experimenting with the command 
line update:

Modify org.eclipse.update.core\plugin.xml (at the bottom of the file) so that
   org.eclipse.update.standalone.StandaloneUpdateApplication
is replaced by
   org.eclipse.update.internal.standalone.StandaloneUpdateApplication
Comment 6 Dorian Birsan CLA 2003-09-02 15:11:17 EDT
The code has been available for quite a while and no feedback has been 
received, I will mark this as fixed.

Please add your comments to this bug or open new bugs to address any issues.
Comment 7 Kai-Uwe Maetzel CLA 2004-12-06 03:48:41 EST
*** Bug 80237 has been marked as a duplicate of this bug. ***