From owner-freebsd-ports-bugs@FreeBSD.ORG Thu May 11 09:20:16 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 10D3416A423 for ; Thu, 11 May 2006 09:20:16 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6DB2243D48 for ; Thu, 11 May 2006 09:20:15 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k4B9KFdQ015343 for ; Thu, 11 May 2006 09:20:15 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k4B9KFA0015342; Thu, 11 May 2006 09:20:15 GMT (envelope-from gnats) Resent-Date: Thu, 11 May 2006 09:20:15 GMT Resent-Message-Id: <200605110920.k4B9KFA0015342@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Pav Lucistnik Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6482016A405 for ; Thu, 11 May 2006 09:15:15 +0000 (UTC) (envelope-from pav@oook.cz) Received: from e0-a11.b1.lan.prg.vol.cz (e0-a11.b1.lan.prg.vol.cz [195.122.204.152]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC77943D45 for ; Thu, 11 May 2006 09:15:14 +0000 (GMT) (envelope-from pav@oook.cz) Received: from pav.hide.vol.cz (localhost [127.0.0.1]) by e0-a11.b1.lan.prg.vol.cz (8.13.6/8.13.6) with ESMTP id k4B9FDJ8035420 for ; Thu, 11 May 2006 11:15:13 +0200 (CEST) (envelope-from pav@pav.hide.vol.cz) Received: (from pav@localhost) by pav.hide.vol.cz (8.13.6/8.13.6/Submit) id k4B9FDc5035419; Thu, 11 May 2006 11:15:13 +0200 (CEST) (envelope-from pav) Message-Id: <200605110915.k4B9FDc5035419@pav.hide.vol.cz> Date: Thu, 11 May 2006 11:15:13 +0200 (CEST) From: Pav Lucistnik To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/97125: automatically invalidate saved OPTIONS on change X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Pav Lucistnik List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2006 09:20:16 -0000 >Number: 97125 >Category: ports >Synopsis: automatically invalidate saved OPTIONS on change >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu May 11 09:20:14 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Pav Lucistnik >Release: FreeBSD 6.1-STABLE i386 >Organization: >Environment: System: FreeBSD pav.hide.vol.cz 6.1-STABLE FreeBSD 6.1-STABLE #0: Thu May 11 02:57:52 CEST 2006 root@pav.hide.vol.cz:/usr/obj/usr/src/sys/GENERIC i386 >Description: Imagine this scenario: 1) User installs an OPTIONS using port, saving his settings 2) Maintainer updates the port, adding some new OPTIONS 3) User updates the port, the OPTIONS dialog is not presented, user misses newly added options. Attached fix compares saved options with a present set of options in the port, and displays the configuration dialog again when it detects an option which is not present in the saved set. The old saved options are retained. >How-To-Repeat: >Fix: --- options-autoinvalidate.diff begins here --- --- bsd.port.mk.orig Wed May 10 23:31:23 2006 +++ bsd.port.mk Thu May 11 10:15:20 2006 @@ -2940,8 +2940,7 @@ # ################################################################ .if (!defined(OPTIONS) || defined(CONFIG_DONE) || \ - defined(PACKAGE_BUILDING) || defined(BATCH) || \ - exists(${_OPTIONSFILE}) || exists(${_OPTIONSFILE}.local)) + defined(PACKAGE_BUILDING) || defined(BATCH)) _OPTIONS_OK=yes .endif @@ -3800,7 +3799,7 @@ .if !target(${target}) && defined(_OPTIONS_OK) ${target}: ${${target:U}_COOKIE} .elif !target(${target}) -${target}: config +${target}: config-conditional @cd ${.CURDIR} && ${MAKE} CONFIG_DONE=1 ${__softMAKEFLAGS} ${${target:U}_COOKIE} .elif target(${target}) && defined(IGNORE) .endif @@ -5299,8 +5298,34 @@ .if !target(config-conditional) config-conditional: -.if defined(OPTIONS) && !exists(${_OPTIONSFILE}) +.if defined(OPTIONS) +.if exists(${_OPTIONSFILE}) +# scan saved options and invalidate them, if the set of options does not match + @. ${_OPTIONSFILE}; \ + set ${OPTIONS} XXX; \ + while [ $$# -gt 3 ]; do \ + withvar=WITH_$$1; \ + withoutvar=WITHOUT_$$1; \ + withval=$$(eval ${ECHO_CMD} $$\{$${withvar}\}); \ + withoutval=$$(eval ${ECHO_CMD} $$\{$${withoutvar}\}); \ + if [ ! -z "$${withval}" ]; then \ + val=on; \ + elif [ ! -z "$${withoutval}" ]; then \ + val=off; \ + else \ + val=missing; \ + fi; \ + if [ "$${val}" = "missing" ]; then \ + OPTIONS_INVALID=yes; \ + fi; \ + shift 3; \ + done; \ + if [ "$${OPTIONS_INVALID}" = "yes" ]; then \ + cd ${.CURDIR} && ${MAKE} config; \ + fi; +.else cd ${.CURDIR} && ${MAKE} config; +.endif .endif .endif --- options-autoinvalidate.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: