There is no way to know what port options mean (in general)

Wesley Shields wxs at FreeBSD.org
Tue Apr 1 10:21:28 PDT 2008


On Fri, Mar 28, 2008 at 12:58:05AM +0100, Pav Lucistnik wrote:
> Wesley Shields p??e v ?t 27. 03. 2008 v 15:58 -0400:
> 
> > > I can see it already! :) Can you code it?
> > 
> > As a first pass I've got an almost working skeleton which uses --hfile
> > and pulls the descriptions from OPTIONS variable (using a 4th field).
> > 
> > It also adds --hline "Please use ? for a detailed description" to the
> > dialog call.
> 
> Cool.
> 
> > It's not quite what you were expecting but I'm not sure how to make
> > dialog show two windows at once - admittedly I have not looked too hard
> > at that.
> 
> It might not be possible with existing dialog(1). Anyway, thanks for the
> effort, I'm looking forward to nexxt week for a final patch.

I've attached a first draft (barely tested, I'm more interested in what
you think of the ideas used - specifically OPTIONS_DESC).

I had to implement an OPTIONS_DESC knob that should be set per-port as
the 4th field is added.  This is necessary because it's impossible to
tell the difference between 3 OPTIONS with a long description (12
fields) or 4 OPTIONS without a long description (12 fields).  I've done
some basic testing but intend to clean it up and properly document - in
both bsd.port.mk and the Porter's Handbook - the additions, assuming the
approach I'm using is liked by the community.

The idea is that OPTIONS goes from:
	NAME "Short Description" Status
to a 4 field format:
	NAME  "Short Description" Status "Long Description, probably
	documenting the immediate dependencies and implications of the knob"

With the addition of the 4th field the OPTIONS_DESC variable must be
set, or everything related to OPTIONS will break.  Eventually, as ports
switch to this format the OPTIONS_DESC knob can be removed and made the
default format of 4 fields.

Once a port uses the extended format the dialog screen supports using
'?' or F1 to view the long descriptions.

I've changed the following targets:
config
config-conditional
showconfig
rmconfig

If I've missed anything please let me know.

-- WXS
-------------- 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/20080401/6c0cfdf2/options-desc.bin


More information about the freebsd-ports mailing list