From owner-freebsd-ports@FreeBSD.ORG Thu May 23 08:24:56 2013 Return-Path: Delivered-To: ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id CFDEE1A1; Thu, 23 May 2013 08:24:56 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) by mx1.freebsd.org (Postfix) with ESMTP id CCECFCB6; Thu, 23 May 2013 08:24:55 +0000 (UTC) Received: from alph.d.allbsd.org (p2175-ipbf701funabasi.chiba.ocn.ne.jp [122.25.209.175]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id r4N8Odfn082680 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 23 May 2013 17:24:49 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) (authenticated bits=0) by alph.d.allbsd.org (8.14.5/8.14.5) with ESMTP id r4N8ObqW097514; Thu, 23 May 2013 17:24:39 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Thu, 23 May 2013 17:21:35 +0900 (JST) Message-Id: <20130523.172135.2156185641495785969.hrs@allbsd.org> To: bapt@FreeBSD.org Subject: Re: Proposal: do not show up the dialog(1) by default? From: Hiroki Sato In-Reply-To: <20130523054541.GH96836@ithaqua.etoilebsd.net> References: <20130523054541.GH96836@ithaqua.etoilebsd.net> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart0(Thu_May_23_17_21_35_2013_044)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Thu, 23 May 2013 17:24:49 +0900 (JST) X-Spam-Status: No, score=-94.5 required=13.0 tests=CONTENT_TYPE_PRESENT, ONLY1HOPDIRECT,RCVD_IN_PBL,SAMEHELOBY2HOP,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org 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 08:24:56 -0000 ----Security_Multipart0(Thu_May_23_17_21_35_2013_044)-- Content-Type: Multipart/Mixed; boundary="--Next_Part(Thu_May_23_17_21_35_2013_383)--" Content-Transfer-Encoding: 7bit ----Next_Part(Thu_May_23_17_21_35_2013_383)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Baptiste Daroussin wrote in <20130523054541.GH96836@ithaqua.etoilebsd.net>: ba> hi, ba> ba> A lot of people seems to be complaining about the configuration dialog 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 config? ba> ba> Just a proposal, please give your opinion. ba> ba> Of course make config-recursive behaviour won't change. 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. I think each port should define their knobs in OPTIONS_DEFINE even for global ones like DOCS because it is more consistent. -- Hiroki ----Next_Part(Thu_May_23_17_21_35_2013_383)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="config-nomenu_bsd.port.mk.20130523-1.diff" Index: Mk/bsd.port.mk =================================================================== --- Mk/bsd.port.mk (revision 317459) +++ Mk/bsd.port.mk (working copy) @@ -6128,6 +6128,9 @@ .undef opt .endif # pre-config +OPTIONS_MENUTIMEOUT?= 5 +OPTIONS_NOMENU?= DOCS NLS EXAMPLES IPV6 +TPUT_CMD?= /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} "===> Cannot create $${optionsdir}, check permissions"; exit 1) .endif - @TMPOPTIONSFILE=$$(mktemp -t portoptions); \ + @if [ "${_RECURSIVE}" != 1 ]; then \ + for opt in ${PORT_OPTIONS}; do \ + oskip=0; \ + for nom in ${OPTIONS_NOMENU}; do \ + case $$opt in \ + $$nom) oskip=1 ;; \ + esac; \ + done; \ + case $$oskip in \ + 0) break ;; \ + esac; \ + done; \ + else \ + oskip=0; \ + fi; \ + if [ "$$oskip" = 1 ]; then \ + trap "${TPUT_CMD} me" 1 2 3 5 10 13 15; \ + ${TPUT_CMD} md; \ + ${ECHO_MSG} "===> This port has user configuration options."; \ + if read -t ${OPTIONS_MENUTIMEOUT} \ + -p "===> To open the configuration menu, hit enter key in ${OPTIONS_MENUTIMEOUT} seconds." \ + DUMMYARG; then \ + oskip=0; \ + fi; \ + ${TPUT_CMD} me; \ + fi; \ + TMPOPTIONSFILE=$$(mktemp -t portoptions); \ trap "${RM} -f $${TMPOPTIONSFILE}; exit 1" 1 2 3 5 10 13 15; \ + if [ "$$oskip" = 0 ]; then \ ${SETENV} ${D4P_ENV} ${SH} ${PORTSDIR}/Tools/scripts/dialog4ports.sh $${TMPOPTIONSFILE} || { \ ${RM} -f $${TMPOPTIONSFILE}; \ ${ECHO_MSG} "===> Options unchanged"; \ exit 0; \ }; \ + fi; \ ${ECHO_CMD}; \ if [ ! -e $${TMPOPTIONSFILE} ]; then \ ${ECHO_MSG} "===> No user-specified options to save for ${PKGNAME}"; \ @@ -6196,7 +6227,7 @@ config-recursive: @${ECHO_MSG} "===> 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=1 config-conditional); \ done .endif # config-recursive @@ -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} != ${_FILE_COMPLETE_OPTIONS_LIST:O} - @cd ${.CURDIR} && ${MAKE} do-config; + @cd ${.CURDIR} && ${MAKE} _RECURSIVE=${_RECURSIVE} do-config; . endif .endif .endif # config-conditional ----Next_Part(Thu_May_23_17_21_35_2013_383)---- ----Security_Multipart0(Thu_May_23_17_21_35_2013_044)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (FreeBSD) iEYEABECAAYFAlGd0Y8ACgkQTyzT2CeTzy3RmACgmLqw/3ymiYdtWbvWLXyTfoSc S0sAoNy+nu7M6z//B+xkvrZ8QhbiGScv =IDpF -----END PGP SIGNATURE----- ----Security_Multipart0(Thu_May_23_17_21_35_2013_044)----