From owner-freebsd-ports@FreeBSD.ORG Mon Jun 11 05:49:47 2012 Return-Path: Delivered-To: freebsd-ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD77B106564A for ; Mon, 11 Jun 2012 05:49:47 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) by mx1.freebsd.org (Postfix) with ESMTP id 0DBB08FC15 for ; Mon, 11 Jun 2012 05:49:46 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [81.187.76.163]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.5/8.14.5) with ESMTP id q5B5ngnE032426 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Mon, 11 Jun 2012 06:49:43 +0100 (BST) (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: OpenDKIM Filter v2.5.2 smtp.infracaninophile.co.uk q5B5ngnE032426 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=infracaninophile.co.uk; s=201001-infracaninophile; t=1339393783; bh=QQD8cNFuqrwpH9kFUqHAEMS2y9F06TzWcvUibPvV72g=; h=Date:From:To:Subject:Cc:Content-Type:In-Reply-To:Message-ID: Mime-Version:References; b=0S8FKZlXCs1qbUN5JfPfDqvFUoam9tDFokN7mGOyhoERmLhEV/8Q5ugIOvLN+F9HP K3Ycne0xkNNtyh/GT8to1uL5utT5o8boW6vRWdBjK2bwTANjjefyT0oRwTjn4/ecrz rYBuEwOge4e/FcKajLhUTJPiKFpjP6mZKC/jN0dg= Message-ID: <4FD586EF.20100@infracaninophile.co.uk> Date: Mon, 11 Jun 2012 06:49:35 +0100 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:13.0) Gecko/20120601 Thunderbird/13.0 MIME-Version: 1.0 To: freebsd-ports X-Enigmail-Version: 1.4.2 OpenPGP: id=60AE908C Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigB9DFADEE73D7E90DF02164B3" X-Virus-Scanned: clamav-milter 0.97.4 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_ADSP_ALL,DKIM_SIGNED,T_DKIM_INVALID autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk Cc: Subject: OPTIONSng and OPTIONS_SINGLE, OPTIONS_MULTI X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jun 2012 05:49:47 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigB9DFADEE73D7E90DF02164B3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Dear all, In the new OPTIONS framework, we have some great new constructs for doing really useful stuff constraining what different combinations of options may be selected. One of these is OPTIONS_SINGLE which implements a 'radio button' permitting the choice of 1 item out of N options. Well, actually, it allows choosing 1 out of N in its generic form. Eg. OPTIONS_SINGLE=3D EXAMPLE OPTIONS_SINGLE_EXAMPLE=3D FOO BAR BAZ BLURFL (permits at exactly one out of FOO BAR BAZ BLURFL to be selected) Now, supposing the requirement is that 'at most one of those options' should be selected. Currently that is done like this: OPTIONS_DEFINE=3D EXAMPLE OPTIONS_SINGLE=3D EXAMPLE OPTIONS_SINGLE_EXAMPLE=3D FOO BAR BAZ BLURFL (requires at most one of FOO BAR BAZ BLURFL to be selected) I find this unsatisfactory, partly for aesthetic reasons and partly because it doesn't make much sense to me. Why should adding a normal on/off option with the same name as the SINGLE group mean you can choose either zero or one of these? It might work if the way options were presented to the user was more sophisticated than dialog(1), so you could grey-out the SINGLE options when the controlling DEFINE is turned off, but dialog doesn't do that. Surely it is more sensible to say that OPTIONS_SINGLE is strictly 'choose one from these options.' Then you can implement 'zero or one of these options' by: OPTIONS_SINGLE=3D EXAMPLE OPTIONS_SINGLE_EXAMPLE=3D FOO BAR BAZ BLURFL NONE_OF_THE_ABOVE Similar arguments apply to OPTIONS_MULTI. OPTIONS_MULTI=3D EXAMPLE2 OPTIONS_MULTI_EXAMPLE2=3D QUX QUUX QUUUX means 'choose at one or more out of QUX QUUX QUUUX' You can change that to mean 'choose any number out of QUX QUUX QUUUX' by: OPTIONS_DEFINE=3D EXAMPLE2 OPTIONS_MULTI=3D EXAMPLE2 OPTIONS_MULTI_EXAMPLE2=3D QUX QUUX QUUUX However, this is syntactically identical to just using normal on/off options with no constraints between them: OPTIONS_DEFINE=3D QUX QUUX QUUUX so that's just redundant. What do people think? Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matthew@infracaninophile.co.uk Kent, CT11 9PW --------------enigB9DFADEE73D7E90DF02164B3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.16 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/VhvYACgkQ8Mjk52CukIxzWACgjuXRJ/vDd7/pIJsi6eLc7ujK 6rcAn02sCV4qVkcml5Q0vpWxjONAb1eW =OUIW -----END PGP SIGNATURE----- --------------enigB9DFADEE73D7E90DF02164B3--