Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342187 - Director should warn and ignore unrecognized options instead of failing
Summary: Director should warn and ignore unrecognized options instead of failing
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.7 M7   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-07 11:47 EDT by Andrew Niefer CLA
Modified: 2011-04-13 17:03 EDT (History)
2 users (show)

See Also:


Attachments
patch (1.82 KB, patch)
2011-04-08 13:46 EDT, Andrew Niefer CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.