long descriptions in OPTIONS

Wesley Shields wxs at FreeBSD.org
Sat Apr 26 01:59:24 UTC 2008


Based upon an idea in an earlier thread on this list[1] I came up with
two ways of adding an extended description to our existing OPTIONS
framework.

1: Extend the OPTIONS to be 4 fields instead of the current 3 fields.
The 4th field would be the long description - providing more detailed
information about what this option does or supports.  In order to
distinguish between a port with 4 OPTIONS without the long description
(12 fields) and a port with 3 OPTIONS with the long description (also 12
fields) the patch requires the port to turn on a knob (OPTIONS_DESC)
when using the long field.  The idea is that over time this will become
the default and can eventually be removed.

2: Leave OPTIONS as is but support a DESC_FOO variable for each OPTION.
This variable would be the long description field, and if it doesn't
exist a default message indicating such would be displayed.

Both of these methods are displayed to the user when '?' or F1 is
pressed during the dialog screen.  In the case of (1) the extra dialog
is only shown if the port supports it.  In the case of (2) the extra
dialog is always available since we have a default message to display.
I suppose a third way would be to use a default message when the knob is
not set for (1), which would probably simplify things slightly.

Personally, I prefer (1) but I'm open to suggestions on how to improve
either of them, or an entirely new idea all together.  I'd like to
submit these as PRs eventually, so please do try to keep the bikesheds
to a minimum.  :)

I've attached both ideas in case people want to try the implementation.
The first one is a few weeks old now and will likely require slight
massaging to apply.

-- WXS

[1]:
http://lists.freebsd.org/pipermail/freebsd-ports/2008-March/047656.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: options-desc.diff
Type: text/x-diff
Size: 4139 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20080426/e81f0b93/options-desc.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: options-desc-2.diff
Type: text/x-diff
Size: 3002 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20080426/e81f0b93/options-desc-2.bin


More information about the freebsd-ports mailing list