From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Mar 9 10:50:07 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 A7622106566B for ; Fri, 9 Mar 2012 10:50:07 +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 76BF08FC15 for ; Fri, 9 Mar 2012 10:50:07 +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 q29Ao78t044080 for ; Fri, 9 Mar 2012 10:50:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q29Ao7JW044079; Fri, 9 Mar 2012 10:50:07 GMT (envelope-from gnats) Resent-Date: Fri, 9 Mar 2012 10:50:07 GMT Resent-Message-Id: <201203091050.q29Ao7JW044079@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, Guido Falsi Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A49601065670 for ; Fri, 9 Mar 2012 10:40:53 +0000 (UTC) (envelope-from mad@madpilot.net) Received: from megatron.madpilot.net (megatron.madpilot.net [88.149.173.206]) by mx1.freebsd.org (Postfix) with ESMTP id 17BAF8FC13 for ; Fri, 9 Mar 2012 10:40:53 +0000 (UTC) Received: from megatron.madpilot.net (localhost [127.0.0.1]) by megatron.madpilot.net (Postfix) with ESMTP id 3V44qy1Wwxz1gP for ; Fri, 9 Mar 2012 11:40:46 +0100 (CET) Received: from megatron.madpilot.net ([127.0.0.1]) by megatron.madpilot.net (megatron.madpilot.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id SQHLIxavNDr0 for ; Fri, 9 Mar 2012 11:40:43 +0100 (CET) Received: by megatron.madpilot.net (Postfix, from userid 1000) id 3V44qv50ncz1gN; Fri, 9 Mar 2012 11:40:43 +0100 (CET) Message-Id: <3V44qv50ncz1gN@megatron.madpilot.net> Date: Fri, 9 Mar 2012 11:40:43 +0100 (CET) From: Guido Falsi To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/165874: [PATCH] bsd.database.mk does not honour WITH_PGSQL_VER anymore X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Guido Falsi List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 10:50:07 -0000 >Number: 165874 >Category: ports >Synopsis: [PATCH] bsd.database.mk does not honour WITH_PGSQL_VER anymore >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Mar 09 10:50:06 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Guido Falsi >Release: FreeBSD 9.0-STABLE amd64 >Organization: none >Environment: System: FreeBSD megatron.madpilot.net 9.0-STABLE FreeBSD 9.0-STABLE #3 r232684: Thu Mar 8 11:40:10 CET 2012 root@megatron.madpilot.net:/usr/obj/usr/src/sys/MEGATRON amd64 >Description: After the last commit to bsd.databse.mk on march 6th the WITH_PGSQL_VER variable in make.conf is not being honoured anymore. The new version of the file is forcing PGSQL_VER == 90, this happens because the sequence of if-elif-elses always ends up in the fallback else. I tested this patch with the ports that were causing me problems, and seems to fix it without any ill effects, but it needs to be better reviewed before committing it. >How-To-Repeat: With recent ports tree(Mk/bsd.database.mk version >= 1.67) do: # cd /usr/ports/databases/libdbi-drivers && make -DWITH_PGSQL_VER=91 -V PGSQL_VER 90 if more testing is needed performing the build will try to install postgresql90-client, which is wrong with that variabler defined. >Fix: --- Mk/bsd.database.mk.orig 2012-03-09 10:55:59.000000000 +0100 +++ Mk/bsd.database.mk 2012-03-09 11:28:39.000000000 +0100 @@ -204,34 +204,34 @@ . endfor . endif _WANT_PGSQL_VER?= ${WANT_PGSQL_VER} +. endif -. if defined(WITH_PGSQL_VER) && !empty(_WANT_PGSQL_VER) -. for version in ${_WANT_PGSQL_VER} -. if ${WITH_PGSQL_VER} == ${version} +. if defined(WITH_PGSQL_VER) && !empty(_WANT_PGSQL_VER) +. for version in ${_WANT_PGSQL_VER} +. if ${WITH_PGSQL_VER} == ${version} PGSQL_VER= ${WITH_PGSQL_VER} -. endif -. endfor +. endif +. endfor # Take highest allowed version, but take default if allowed -. elif !empty(_WANT_PGSQL_VER) -. for ver in ${_WANT_PGSQL_VER} -. if ${DEFAULT_PGSQL_VER} == ${ver} +. elif !empty(_WANT_PGSQL_VER) +. for ver in ${_WANT_PGSQL_VER} +. if ${DEFAULT_PGSQL_VER} == ${ver} PGSQL_VER= ${ver} -. else +. else _PGSQL_VER_HIGHEST= ${ver} -. endif -. endfor +. endif +. endfor PGSQL_VER?= ${_PGSQL_VER_HIGHEST} -. elif defined(WITH_PGSQL_VER) +. elif defined(WITH_PGSQL_VER) PGSQL_VER= ${WITH_PGSQL_VER} . endif -. else -. if defined(_PGSQL_VER) + +. if defined(_PGSQL_VER) PGSQL_VER= ${_PGSQL_VER} -. else -PGSQL_VER= ${DEFAULT_PGSQL_VER} -. endif -. endif # WANT_PGSQL_VER +. else +PGSQL_VER?= ${DEFAULT_PGSQL_VER} +. endif . if empty(PGSQL_VER) IGNORE?= cannot install: the port wants postgresql-client version ${WANT_PGSQL_VER} and you have set WITH_PGSQL_VER=${WITH_PGSQL_VER} in make.conf or have postgresql${WITH_PGSQL_VER}-client installed >Release-Note: >Audit-Trail: >Unformatted: