[rfc][icedtea-web][itweb-settings] itweb-settings use Option Parser

Lukasz Dracz ldracz at redhat.com
Thu Sep 18 21:28:04 UTC 2014


I have worked on changing itwebsettings to use the Option Parser.
The biggest change this code brings is the ability to do multiple itwebsettings options at once, you can for example
set and get or reset and set (reset happens first then set is applied). Also I have reworked get, info, set, and reset to allow to take in multiple args instead of just one. Ex. 'itweb-settings get deployment.security.level deployment.manifest.attributes.check deployment.console.startup.mode' will get all three. 

itweb-settings help will display the main help, where as itwebsettings get help will display the specific help for get. If help is present and other options are present it will get the help for all the other options Ex. itweb-settings get help reset check will get the help for (get, reset and check). A limitation is you can't do for ex. 'itweb-setting get help reset all info deployment.javapi.cache.enabled' this will simply display help for get, reset and info only. I can look into getting it to work by displaying help for get, resetting all and getting the info for deployment.javapi.cache.enabled, but then I think I am going to have to limit the help to appear right after the command which would lead to for example, itweb-settings get help reset help info help to get help for all. I'm just wondering if anyone has an opinion on this matter of what would be the preferred way to handle this.

Also looking at the main help that is outputted 'check name     - Checks that the current value of the setting is a valid value.' that description is not accurate of what happens in the code. The check option checks through all the values and outputs those that are wrong. Should I implement it to work by just checking the named value if available and just check all if nothing is specified or should the help message text be changed ? Personally I think it is fine as it is and the help message text should just be changed to how it works.

Thank you,
Lukasz Dracz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: itwebsettingsOptionParser-2.patch
Type: text/x-patch
Size: 19456 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20140918/1731c4fd/itwebsettingsOptionParser-2-0001.patch>

More information about the distro-pkg-dev mailing list