From laszlof@vonostingroup.com  Thu Mar 30 00:23:13 2006
Return-Path: <laszlof@vonostingroup.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id C603316A41F;
	Thu, 30 Mar 2006 00:23:13 +0000 (UTC)
	(envelope-from laszlof@vonostingroup.com)
Received: from ritamari.vonostingroup.com (ritamari.vonostingroup.com [216.144.193.230])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 24D3F43D72;
	Thu, 30 Mar 2006 00:23:07 +0000 (GMT)
	(envelope-from laszlof@vonostingroup.com)
Received: from c-71-227-92-22.hsd1.mi.comcast.net ([71.227.92.22] helo=[192.168.0.3])
	by ritamari.vonostingroup.com with esmtpsa (TLSv1:AES256-SHA:256)
	(Exim 4.60 (FreeBSD))
	(envelope-from <laszlof@vonostingroup.com>)
	id 1FOkyW-000F4h-LK; Wed, 29 Mar 2006 19:25:20 -0500
Message-Id: <442B24E7.7000705@vonostingroup.com>
Date: Wed, 29 Mar 2006 19:23:03 -0500
From: Frank Laszlo <laszlof@vonostingroup.com>
To: Kris Kennaway <kris@obsecurity.org>
Cc: FreeBSD-gnats-submit@freebsd.org,  portmgr@freebsd.org
In-Reply-To: <20060329234131.GA83416@xor.obsecurity.org>
Subject: Re: [PATCH]: Add knob to allow for mutually exclusive OPTIONS
References: <E1FOjSr-000CHU-8U@ritamari.vonostingroup.com> <20060329232520.GA83120@xor.obsecurity.org> <442B1A53.9000305@vonostingroup.com> <20060329234131.GA83416@xor.obsecurity.org>

>Number:         95092
>Category:       ports
>Synopsis:       Re: [PATCH]: Add knob to allow for mutually exclusive OPTIONS
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 30 00:30:18 GMT 2006
>Closed-Date:    Thu Mar 30 01:04:58 GMT 2006
>Last-Modified:  Fri Mar 31 00:40:06 GMT 2006
>Originator:     
>Release:        
>Organization:
>Environment:
>Description:
 Kris Kennaway wrote:
 > On Wed, Mar 29, 2006 at 06:37:55PM -0500, Frank Laszlo wrote:
 >   
 >> Kris Kennaway wrote:
 >>     
 >>> This seems of somewhat restricted utility.  How many ports are there
 >>> where all options are mutually exclusive?
 >>>
 >>> Kris
 >>>
 >>>
 >>>  
 >>>       
 >> There are actually quite a few of them, Currently the port maintainers 
 >> are just doing something like:
 >>
 >> .if defined(WITH_OPTION1) && defined(WITH_OPTION2)
 >> IGNORE=      Please only choose only 1 option
 >> .endif
 >>
 >> Or something along the lines of that. For the few lines of code it adds 
 >> to bsd.port.mk, and the fact that it doesn't affect the current 
 >> operation of existing ports using OPTIONS. I think it would be a valued 
 >> addition to the ports.
 >>     
 >
 > Can you point out say half a dozen of them & provide a sample patch to
 > convert them?
 >
 > Kris
 >   
 I was only able to come up with 2 current ports that would use this 
 functionality. But I found around 20 that could use something like this, 
 but it would require OPTIONS to support submenus. Since there would be 
 both checklist options, and radiolist options. The ports that would be 
 directly benefitial from this patch are mail/roundcube and 
 print/xfce4-print. And the patches are here:
 
 http://www.franksworld.org/~laszlof/patches/roundcube.diff
 http://www.franksworld.org/~laszlof/patches/xfce4-print.diff
 
 Cheers,
     Frank
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Thu Mar 30 01:04:42 UTC 2006 
State-Changed-Why:  
Misfiled followup to ports/95085; content migrated. 


Responsible-Changed-From-To: gnats-admin->freebsd-ports-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Thu Mar 30 01:04:42 UTC 2006 
Responsible-Changed-Why:  

http://www.freebsd.org/cgi/query-pr.cgi?pr=95092 

From: Frank Laszlo <laszlof@vonostingroup.com>
To: Clement Laforet <clement@FreeBSD.org>
Cc: Kris Kennaway <kris@obsecurity.org>, 
 FreeBSD-gnats-submit@freebsd.org,  portmgr@freebsd.org
Subject: Re: ports/95092: Re: [PATCH]: Add knob to allow for mutually exclusive
 OPTIONS
Date: Thu, 30 Mar 2006 07:55:23 -0500

 Clement Laforet wrote:
 > On Wed, Mar 29, 2006 at 07:28:28PM -0500, Kris Kennaway wrote:
 >   
 >> I don't like adding new bsd.port.mk variables for the benefit of only
 >> 2/14000 ports..
 >>     
 >
 > Many ports don't use OPTIONS because of the lack of mutual exclusive 
 > support.
 >
 > clem
 >   
 That is a good point, I also think that since OPTIONS is the recommended 
 method for adding user interaction to ports, We should expand on its 
 functionality. Perhaps add support for submenu's such as those that are 
 used in sysinstall. This would allow port maintainers to use both 
 checklists and radiolists side by side.
 
 -Frank

From: Frank Laszlo <laszlof@vonostingroup.com>
To: Kris Kennaway <kris@obsecurity.org>
Cc: Clement Laforet <clement@FreeBSD.org>, 
 FreeBSD-gnats-submit@freebsd.org,  portmgr@freebsd.org
Subject: Re: ports/95092: Re: [PATCH]: Add knob to allow for mutually exclusive
 OPTIONS
Date: Thu, 30 Mar 2006 19:34:16 -0500

 Please keep this subject so that it is properly filed in gnats. I 
 believe that this would be an excellent addition to the ports 
 collection, but further expansion should be done. Building the framework 
 to allow more features with OPTIONS. Such as submenus, much like those 
 used in sysinstall. This would allow for port maintainers to more 
 specifically allow certain options, and not allow other options. Lets 
 take for example a port that requires a database backend. There are 3 
 choices we have, pgsql, mysql, or flatfile. This port also has options 
 for enabling FOO and BAR. This would pose to be a problem with the 
 current system, and we would have to preform several " if defined" 
 statements to filter out mistakes the user may make. If we had submenus, 
 we couple simple make a "Backend" submenu with --radiolist, and a 
 "Feature" submenu with --checklist. I believe it would be fairly trivial 
 to implement this into bsd.port.mk and would be willing to submit 
 patches if there is interest for such a feature.
 
 Cheers,
     Frank
>Unformatted:
