Page MenuHomeFreeBSD

Document the opt_IMPLIES/opt_PREVENTS helpers.
ClosedPublic

Authored by mat on Aug 18 2015, 11:52 AM.

Diff Detail

Repository
rD FreeBSD doc repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mat updated this revision to Diff 8027.Aug 18 2015, 11:52 AM
mat retitled this revision from to Document the opt_IMPLIES/opt_PREVENTS helpers..
mat updated this object.
mat edited the test plan for this revision. (Show Details)
mat added a reviewer: wblock.
mat added a subscriber: portmgr.
mat updated this object.Aug 18 2015, 11:54 AM
wblock edited edge metadata.Aug 18 2015, 12:40 PM

Interesting. Real examples might be easier to understand than generic opt1 and opt2.

mat added a comment.Aug 19 2015, 12:59 PM
In D3409#69643, @wblock wrote:

Interesting. Real examples might be easier to understand than generic opt1 and opt2.

I've been trying to write examples, but they're all phony, and don't look any better than the generic opt1/opt2, and they don't add any information from what is already there.

Hi Mat,
Looks pretty good, for what it's worth I have 2 comments:

  1. I see the OPT_IMPLIES and OPT_PREVENTS as macros which assist in the selection of which options are enabled, similar to the OPTIONS_SINGLE and OPTIONS_RADIO grouping, rather than option helpers which add some Makefile logic once an option has been enabled. Hopefully one day dialog4ports will be updated to represent the conflict/dependency logic in the user interface for selection options, rather than waiting until after the user has attempted to make a selection. With that in mind, I feel like the documentation for these macros belongs either in the same section as the OPTION_SINGLE and OPTIONS_RADIO grouping syntax (section 5.12.1.2), or in it's own section 4 within the same section 3 (section 5.12.1.4), rather than with the option helpers (section 5.12.3).
  2. The example you have provided for OPT_IMPLIES uses the word "enable" in a different sense to the way this macro is intended. People may get confused and think this option is somehow related to the OPT_CONFIGURE_ENABLE helper for specifying compile time --enable-opt syntax, rather than what it actually does which is simply enable the option and any other specified actions that come with it. I'm not sure the example needs to go so far as to explain that any normal behaviour that comes with an option would also occur, I think the text could simply state this. The example could be limited to demonstrating that even if you don't specifically enable an option, it will be enabled if you enable another option which has registered it as a dependency with OPT_IMPLIES.

Cheers,
Ben

mat updated this revision to Diff 8157.Aug 24 2015, 12:38 PM
mat edited edge metadata.
  • Add examples, and don't use enable/disable but select/un-select.
mat updated this revision to Diff 8158.Aug 24 2015, 12:42 PM
  • Igor.
mat updated this revision to Diff 8159.Aug 24 2015, 12:44 PM
  • Finish a sentence.
mat updated this revision to Diff 8161.Aug 24 2015, 12:57 PM
  • Also document the _PREVENTS_MSG from D3469.
This revision was automatically updated to reflect the committed changes.