From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Jul 25 21:50:06 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D021D106564A for ; Wed, 25 Jul 2012 21:50:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 9F8128FC0C for ; Wed, 25 Jul 2012 21:50:06 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q6PLo6si092239 for ; Wed, 25 Jul 2012 21:50:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q6PLo6v8092238; Wed, 25 Jul 2012 21:50:06 GMT (envelope-from gnats) Resent-Date: Wed, 25 Jul 2012 21:50:06 GMT Resent-Message-Id: <201207252150.q6PLo6v8092238@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, Olli Hauer Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EFBBB1065670 for ; Wed, 25 Jul 2012 21:47:52 +0000 (UTC) (envelope-from ohauer@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id BA27D8FC0C for ; Wed, 25 Jul 2012 21:47:52 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q6PLlqdb091921 for ; Wed, 25 Jul 2012 21:47:52 GMT (envelope-from ohauer@freefall.freebsd.org) Received: (from ohauer@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q6PLlqoI091920; Wed, 25 Jul 2012 21:47:52 GMT (envelope-from ohauer) Message-Id: <201207252147.q6PLlqoI091920@freefall.freebsd.org> Date: Wed, 25 Jul 2012 21:47:52 GMT From: Olli Hauer To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/170180: [patch] Mk/bsd.options.mk allow make.conf and command line args to apply X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Olli Hauer List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jul 2012 21:50:06 -0000 >Number: 170180 >Category: ports >Synopsis: [patch] Mk/bsd.options.mk allow make.conf and command line args to apply >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Jul 25 21:50:06 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Olli Hauer >Release: FreeBSD 8.3-RELEASE-p3 amd64 >Organization: >Environment: >Description: The new options framework has a major bug. If for a port "make config" was already done, make.conf and command line params are ignored. To restore the old behavior simply swap the following block in bsd.options.mk. ### convert WITH and WITHOUT found in make.conf or reloaded from old optionsfile .for opt in ${ALL_OPTIONS} ... ## Finish by using the options set by the port config dialog, if any . for opt in ${OPTIONS_FILE_SET} Issue reported already on ports@ Additional SLAVE ports can no longer overwrite options set in the MASTER port if "make config" was already done. If this is possible, please extend the wiki with an working example. The patch fix only the make.conf / command param issu. >How-To-Repeat: $ cd shells/zsh make config => deselect STATIC $ make showconfig | grep STATIC STATIC=off: Build static executable/libraries $ make -V LDFLAGS -L/usr/local/lib -rpath=/usr/lib:/usr/local/lib $ make -V LDFLAGS WITH_STATIC=true ( or $ OPTIONS_SET="STATIC" make showconfig ) -L/usr/local/lib -rpath=/usr/lib:/usr/local/lib Expected result: -L/usr/local/lib -rpath=/usr/lib:/usr/local/lib -static >Fix: --- bsd.options.mk.diff begins here --- Index: bsd.options.mk =================================================================== --- bsd.options.mk (revision 301530) +++ bsd.options.mk (working copy) @@ -173,17 +173,6 @@ . include "${OPTIONSFILE}.local" . endif -### convert WITH and WITHOUT found in make.conf or reloaded from old optionsfile -.for opt in ${ALL_OPTIONS} -.if defined(WITH_${opt}) -PORT_OPTIONS+= ${opt} -PORT_OPTIONS:= ${PORT_OPTIONS:O:u} -.endif -.if defined(WITHOUT_${opt}) -PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} -.endif -.endfor - ## Finish by using the options set by the port config dialog, if any . for opt in ${OPTIONS_FILE_SET} . if !empty(COMPLETE_OPTIONS_LIST:M${opt}) @@ -199,6 +188,17 @@ .endif +### convert WITH and WITHOUT found in make.conf or reloaded from old optionsfile +.for opt in ${ALL_OPTIONS} +.if defined(WITH_${opt}) +PORT_OPTIONS+= ${opt} +PORT_OPTIONS:= ${PORT_OPTIONS:O:u} +.endif +.if defined(WITHOUT_${opt}) +PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} +.endif +.endfor + ## Now some compatibility .if empty(PORT_OPTIONS:MDOCS) NOPORTDOCS= yes --- bsd.options.mk.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: