Danek Duvall wrote:
On Fri, Jul 10, 2009 at 11:54:17AM -0500, Shawn Walker wrote:
I'm fine with whatever the consensus is. My feeling though was that it
was more user-friendly to accept policy overrides on the command-line
regardless of subcommand without having to maintain a list per-subcommand
on which policies were allowed, etc. and just having to error out to the
user.
I don't see what that has to do with making the option global vs
per-subcommand, though. Just because the option is recognized in one place
or another doesn't mean it has to have any other different behavior.
Instead, the approach of "you may override or specify any policy values
you like, and if applicable, they will be used for the operation" seems
nicer.
And that can work even if you put the option flag after the subcommand.
Am I missing something?
No, but I was. After mulling over the subcommands again, I agree that
there are a limited number of subcommands it would ever be applicable to.
In particular, my prior justification was that it would allow us not to
error out when --policy isn't available for a particular subcommand, and
we wouldn't have to document on a per-subcommand basis the --policy
option. However, with the right wording and arrangement I think we can
achieve a happy compromise.
I also found one case where having --policy be at the subcommand level
made more sense: iamge-create. In that case, --policy will be used to
specify the initial values for the new image instead of acting as a
temporary override for the operation.
It also doesn't make sense to use --policy with any of the property or
policy subcommands.
The following subcommands are the ones I know have immediate
applicability for --policy:
- install
- uninstall
- image-update
- fix
Eventually, there will be policies that will subtly influence these
subcommands:
- verify
- list
- info
- contents
- history
I'll update the proposal accordingly. Thanks for sticking with this.
Cheers,
--
Shawn Walker
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss