Date: Fri, 9 Mar 2012 11:40:43 +0100 (CET) From: Guido Falsi <mad@madpilot.net> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/165874: [PATCH] bsd.database.mk does not honour WITH_PGSQL_VER anymore Message-ID: <3V44qv50ncz1gN@megatron.madpilot.net> Resent-Message-ID: <201203091050.q29Ao7JW044079@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3V44qv50ncz1gN>