From owner-freebsd-ports@FreeBSD.ORG Thu May 23 09:06:35 2013 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id BBCB09B4; Thu, 23 May 2013 09:06:35 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-we0-x232.google.com (mail-we0-x232.google.com [IPv6:2a00:1450:400c:c03::232]) by mx1.freebsd.org (Postfix) with ESMTP id 2C8C8E94; Thu, 23 May 2013 09:06:35 +0000 (UTC) Received: by mail-we0-f178.google.com with SMTP id q56so1873155wes.37 for ; Thu, 23 May 2013 02:06:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=154dbpYc1rfF9+9NKT4LTDg//zTqc8o9tiYOQi/KSKM=; b=YKSr+vFzLWvv0VSYP48Svi+3lLD/bEaYZgfZ8OxUM/QkqXKVgbuKzBDv4I0W0Fb5jt V9gL3lwNz2oRB+3PFulkHXnNvrSvGkSYnsO/2kb/5RQi5G11i26g86HLbaEgeqK/4Zyt 38Pzd097wc9r/2UYY6ZhV1B/ncFmr2cD6nVUOnQjL0NpcxCijQUQawwRjq64dQIXMe7J BYLaLcrnlKDILLrmHQF50DoEj1f3MMdLuWOFQVrnmpsbPl0u0XDCZs3CI59JWB0f18dr efVNQ4CeXpqAmlp6/quKw4KZjRCAKoatFWrE+9E/aBwSiihhgT+MW6p/aYttJNFFlMO1 eQ7Q== X-Received: by 10.180.36.147 with SMTP id q19mr22333000wij.26.1369299994362; Thu, 23 May 2013 02:06:34 -0700 (PDT) Received: from ithaqua.etoilebsd.net (ithaqua.etoilebsd.net. [37.59.37.188]) by mx.google.com with ESMTPSA id k10sm16172791wia.4.2013.05.23.02.06.32 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 23 May 2013 02:06:33 -0700 (PDT) Sender: Baptiste Daroussin Date: Thu, 23 May 2013 11:06:31 +0200 From: Baptiste Daroussin To: Hiroki Sato Subject: Re: Proposal: do not show up the dialog(1) by default? Message-ID: <20130523090630.GL96836@ithaqua.etoilebsd.net> References: <20130523054541.GH96836@ithaqua.etoilebsd.net> <20130523.172135.2156185641495785969.hrs@allbsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tv2SIFopg1r47n4a" Content-Disposition: inline In-Reply-To: <20130523.172135.2156185641495785969.hrs@allbsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: ports@FreeBSD.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2013 09:06:35 -0000 --tv2SIFopg1r47n4a Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 23, 2013 at 05:21:35PM +0900, Hiroki Sato wrote: > Baptiste Daroussin wrote > in <20130523054541.GH96836@ithaqua.etoilebsd.net>: >=20 > ba> hi, > ba> > ba> A lot of people seems to be complaining about the configuration dialo= g popping > ba> up all the time. > ba> > ba> What if we change the default behaviour to not pop up the dialog each= time there > ba> is a changed option but only when the user explicitly type make confi= g? > ba> > ba> Just a proposal, please give your opinion. > ba> > ba> Of course make config-recursive behaviour won't change. >=20 > I am using the attached patch locally to make the four global knobs > silent. This is a kind of overkill, but "adding OPTIONS_NOMENU and > making the do-config target skip the dialog invocation when all of > values in OPTIONS_DEFINE are defined in OPTIONS_NOMENU" would be a > compromise. If one wants dialog for the global knobs, OPTIONS_NOMENU > can always be redefined in make.conf. >=20 > I think each port should define their knobs in OPTIONS_DEFINE even > for global ones like DOCS because it is more consistent. >=20 > -- Hiroki Great thank you, I'll base my work on this patch. regards, Bapt > Index: Mk/bsd.port.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- Mk/bsd.port.mk (revision 317459) > +++ Mk/bsd.port.mk (working copy) > @@ -6128,6 +6128,9 @@ > .undef opt > .endif # pre-config >=20 > +OPTIONS_MENUTIMEOUT?=3D 5 > +OPTIONS_NOMENU?=3D DOCS NLS EXAMPLES IPV6 > +TPUT_CMD?=3D /usr/bin/tput > .if !target(do-config) > do-config: > .if empty(ALL_OPTIONS) && empty(OPTIONS_SINGLE) && empty(OPTIONS_MULTI) = && empty(OPTIONS_RADIO) && empty(OPTIONS_GROUP) > @@ -6144,13 +6147,41 @@ > ${MKDIR} $${optionsdir} 2> /dev/null) || \ > (${ECHO_MSG} "=3D=3D=3D> Cannot create $${optionsdir}, check permission= s"; exit 1) > .endif > - @TMPOPTIONSFILE=3D$$(mktemp -t portoptions); \ > + @if [ "${_RECURSIVE}" !=3D 1 ]; then \ > + for opt in ${PORT_OPTIONS}; do \ > + oskip=3D0; \ > + for nom in ${OPTIONS_NOMENU}; do \ > + case $$opt in \ > + $$nom) oskip=3D1 ;; \ > + esac; \ > + done; \ > + case $$oskip in \ > + 0) break ;; \ > + esac; \ > + done; \ > + else \ > + oskip=3D0; \ > + fi; \ > + if [ "$$oskip" =3D 1 ]; then \ > + trap "${TPUT_CMD} me" 1 2 3 5 10 13 15; \ > + ${TPUT_CMD} md; \ > + ${ECHO_MSG} "=3D=3D=3D> This port has user configuration options."; \ > + if read -t ${OPTIONS_MENUTIMEOUT} \ > + -p "=3D=3D=3D> To open the configuration menu, hit enter key in ${OPTI= ONS_MENUTIMEOUT} seconds." \ > + DUMMYARG; then \ > + oskip=3D0; \ > + fi; \ > + ${TPUT_CMD} me; \ > + fi; \ > + TMPOPTIONSFILE=3D$$(mktemp -t portoptions); \ > trap "${RM} -f $${TMPOPTIONSFILE}; exit 1" 1 2 3 5 10 13 15; \ > + if [ "$$oskip" =3D 0 ]; then \ > ${SETENV} ${D4P_ENV} ${SH} ${PORTSDIR}/Tools/scripts/dialog4ports.sh $$= {TMPOPTIONSFILE} || { \ > ${RM} -f $${TMPOPTIONSFILE}; \ > ${ECHO_MSG} "=3D=3D=3D> Options unchanged"; \ > exit 0; \ > }; \ > + fi; \ > ${ECHO_CMD}; \ > if [ ! -e $${TMPOPTIONSFILE} ]; then \ > ${ECHO_MSG} "=3D=3D=3D> No user-specified options to save for ${PKGNAM= E}"; \ > @@ -6196,7 +6227,7 @@ > config-recursive: > @${ECHO_MSG} "=3D=3D=3D> Setting user-specified options for ${PKGNAME} = and dependencies"; > @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \ > - (cd $$dir; ${MAKE} config-conditional); \ > + (cd $$dir; ${MAKE} _RECURSIVE=3D1 config-conditional); \ > done > .endif # config-recursive >=20 > @@ -6204,7 +6235,7 @@ > config-conditional: pre-config > .if defined(COMPLETE_OPTIONS_LIST) && !defined(NO_DIALOG) > . if !defined(_FILE_COMPLETE_OPTIONS_LIST) || ${COMPLETE_OPTIONS_LIST:O= } !=3D ${_FILE_COMPLETE_OPTIONS_LIST:O} > - @cd ${.CURDIR} && ${MAKE} do-config; > + @cd ${.CURDIR} && ${MAKE} _RECURSIVE=3D${_RECURSIVE} do-config; > . endif > .endif > .endif # config-conditional --tv2SIFopg1r47n4a Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlGd3BYACgkQ8kTtMUmk6Ewz2wCgqtEqGKxtDqrm2ruA0pvBrrze FR8An13JnHvZ46fqfKB87souctBp8NK4 =RBC0 -----END PGP SIGNATURE----- --tv2SIFopg1r47n4a--