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

Bug 342187

Summary: Director should warn and ignore unrecognized options instead of failing
Product: [Eclipse Project] Equinox Reporter: Andrew Niefer <aniefer>
Component: p2Assignee: P2 Inbox <equinox.p2-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: pwebster, remy.suen
Version: 3.7   
Target Milestone: 3.7 M7   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
patch none

Description Andrew Niefer CLA 2011-04-07 11:47:05 EDT
The director currently fails and exits on unrecognized options.

This makes it impossible to use the director application from an existing eclipse install if the eclipse.ini contains any options that were not consumed by the launcher or osgi itself.

From http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/runtime-options.html, the following options cause the director to fail. (The first two * are present in my install.)
-showLocation  *
-eclipse.password *
-eclipse.keyring
-registryMultiLanguage
-noRegistryCache
-noLazyRegistryCacheLoading

i didn't try any of the obsolete options, and all the options from 'Others' (ie the workbench) would also cause the director to fail.
Comment 1 Remy Suen CLA 2011-04-07 16:27:38 EDT
I'm not sure I agree with this. This might mean a provisioning request would go through even if some stuff wasn't recognized.

Consider something like this...

p2director -installFrom x -instalTo y (note the typo)

...the 'instalTo' argument is ignored and the Director decides to default to the same installation. This means my installation will be changed now (which is probably not what I want) and I will be forced to do a revert and probably also use the GC to delete stuff.

This might be an extreme example (or maybe I'm misunderstanding the request here) but thought I'd bring it up.
Comment 2 Andrew Niefer CLA 2011-04-08 13:46:19 EDT
Created attachment 192865 [details]
patch

Proposed patch adds -showLocation, -eclipse.password and -eclipse.keyring as recognized options that are ignored.

Any other unrecognized option remains an error as before.
Comment 3 Andrew Niefer CLA 2011-04-13 17:03:36 EDT
I released the attach patch.  The director still fails on unrecognized options, it just ignores some that it knows about.