Date: Tue, 11 May 2004 14:05:41 +0200 (CEST) From: Mathieu Arnold <mat@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/66520: Have OPTIONS set defaults when BATCH or PACKAGE_BUILDING is on Message-ID: <20040511120541.988037CD1@aragorn.in.absolight.net> Resent-Message-ID: <200405111210.i4BCAFQX041015@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 66520 >Category: ports >Synopsis: Have OPTIONS set defaults when BATCH or PACKAGE_BUILDING is on >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue May 11 05:10:15 PDT 2004 >Closed-Date: >Last-Modified: >Originator: Mathieu Arnold >Release: FreeBSD 4.8-RELEASE i386 >Organization: Absolight >Environment: System: FreeBSD aragorn.in.absolight.net 4.8-RELEASE FreeBSD 4.8-RELEASE #0: Wed Sep 3 12:54:37 CEST 2003 root@aragorn.reaumur.absolight.net:/usr/src/sys/compile/ARAGORN i386 >Description: When using BATCH or PACKAGE_BUILDING, OPTIONS are disabled. Some ports may need to have some default values available to compile properly. >How-To-Repeat: >Fix: --- bsd.port.mk.diff begins here --- Index: bsd.port.mk =================================================================== RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v retrieving revision 1.488 diff -u -r1.488 bsd.port.mk --- bsd.port.mk 19 Apr 2004 23:39:52 -0000 1.488 +++ bsd.port.mk 11 May 2004 11:56:22 -0000 @@ -2662,7 +2662,6 @@ # ################################################################ .if (!defined(OPTIONS) || defined(CONFIG_DONE) || \ - defined(PACKAGE_BUILDING) || defined(BATCH) || \ exists(${_OPTIONSFILE}) || exists(${_OPTIONSFILE}.local)) _OPTIONS_OK=yes .endif @@ -4728,30 +4726,39 @@ withval=$$(eval ${ECHO_CMD} $$\{$${withvar}\}); \ withoutval=$$(eval ${ECHO_CMD} $$\{$${withoutvar}\}); \ if [ ! -z "$${withval}" ]; then \ + BATCHSELOPTIONS="$${BATCHSELOPTIONS} $$1"; \ val=on; \ elif [ ! -z "$${withoutval}" ]; then \ val=off; \ else \ val=$$3; \ + if [ "$$3" = "ON" ]; then \ + BATCHSELOPTIONS="$${BATCHSELOPTIONS} $$1"; \ + fi; \ fi; \ DEFOPTIONS="$${DEFOPTIONS} $$1 \"$$2\" $${val}"; \ shift 3; \ done; \ - TMPOPTIONSFILE=$$(mktemp -t portoptions); \ - trap "${RM} -f $${TMPOPTIONSFILE}; exit 1" 1 2 3 5 10 13 15; \ - ${SH} -c "${DIALOG} --checklist \"Options for ${PKGNAME:C/-([^-]+)$/ \1/}\" 21 70 15 $${DEFOPTIONS} 2> $${TMPOPTIONSFILE}"; \ - status=$$?; \ - if [ $${status} -ne 0 ] ; then \ + if [ -z "${BATCH}${PACKAGE_BUILDING}" ]; then \ + TMPOPTIONSFILE=$$(mktemp -t portoptions); \ + trap "${RM} -f $${TMPOPTIONSFILE}; exit 1" 1 2 3 5 10 13 15; \ + ${SH} -c "${DIALOG} --checklist \"Options for ${PKGNAME:C/-([^-]+)$/ \1/}\" 21 70 15 $${DEFOPTIONS} 2> $${TMPOPTIONSFILE}"; \ + exit; \ + status=$$?; \ + if [ $${status} -ne 0 ] ; then \ + ${RM} -f $${TMPOPTIONSFILE}; \ + ${ECHO_MSG} "===> Options unchanged"; \ + exit 0; \ + fi; \ + if [ ! -e ${TMPOPTIONSFILE} ]; then \ + ${ECHO_MSG} "===> No user-specified options to save for ${PKGNAME}"; \ + exit 0; \ + fi; \ + SELOPTIONS=$$(${CAT} $${TMPOPTIONSFILE}); \ ${RM} -f $${TMPOPTIONSFILE}; \ - ${ECHO_MSG} "===> Options unchanged"; \ - exit 0; \ - fi; \ - if [ ! -e ${TMPOPTIONSFILE} ]; then \ - ${ECHO_MSG} "===> No user-specified options to save for ${PKGNAME}"; \ - exit 0; \ + else \ + SELOPTIONS=$${BATCHSELOPTIONS}; \ fi; \ - SELOPTIONS=$$(${CAT} $${TMPOPTIONSFILE}); \ - ${RM} -f $${TMPOPTIONSFILE}; \ TMPOPTIONSFILE=$$(mktemp -t portoptions); \ trap "${RM} -f $${TMPOPTIONSFILE}; exit 1" 1 2 3 5 10 13 15; \ ${ECHO_CMD} "# This file is auto-generated by 'make config'." > $${TMPOPTIONSFILE}; \ --- bsd.port.mk.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040511120541.988037CD1>