ports/76988: WANT_PGSQL_VER ignored when postgresql version already installed
Palle Girgensohn
girgen at FreeBSD.org
Wed Feb 2 02:50:06 UTC 2005
>Number: 76988
>Category: ports
>Synopsis: WANT_PGSQL_VER ignored when postgresql version already installed
>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: Wed Feb 02 02:50:05 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Palle Girgensohn <girgen at FreeBSD.org>
>Release: FreeBSD 5.3-RELEASE-p1 i386
>Organization:
Ping Pong AB
>Environment:
System: FreeBSD palle.girgensohn.se 5.3-RELEASE-p1 FreeBSD 5.3-RELEASE-p1 #16: Sat Nov 20 04:26:58 CET 2004 girgen at palle.girgensohn.se:/usr/obj/4/usr/5src/sys/PALLE i386
>Description:
WANT_PGSQL_VER is a newly comitted knob in Mk/bsd.ports.mk, intended
for ports that need a certain version of postgresql.
Problem: When a postgresql version is already installed, this knob has
no effect. Hence, wrong version of postgresql may be used, instead of
the port in question failing to build and warn the user about the
problem.
>How-To-Repeat:
>Fix:
Index: Mk/bsd.port.mk
===================================================================
RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.506
diff -u -r1.506 bsd.port.mk
--- Mk/bsd.port.mk 31 Jan 2005 00:35:38 -0000 1.506
+++ Mk/bsd.port.mk 2 Feb 2005 01:24:57 -0000
@@ -1708,20 +1708,28 @@
DEFAULT_PGSQL_VER?= 74
# Setting/finding PostgreSQL version we want.
-.if defined(WANT_PGSQL_VER)
+.if exists(${LOCALBASE}/bin/pg_config)
+_PGSQL_VER!= ${LOCALBASE}/bin/pg_config --version | ${SED} -n 's/PostgreSQL[^0-9]*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\..*/\1\2/p'
+.endif
+
+.if defined(WANT_PGSQL_VER) && defined(_PGSQL_VER) && ${WANT_PGSQL_VER} != ${_PGSQL_VER}
+BROKEN= The port wants postgresql${WANT_PGSQL_VER}-client but you have postgresql${_PGSQL_VER}-client installed
+.endif
+
+.if defined(_PGSQL_VER)
+PGSQL_VER= ${_PGSQL_VER}
+.elif defined(WANT_PGSQL_VER)
PGSQL_VER= ${WANT_PGSQL_VER}
-.elif exists(${LOCALBASE}/bin/pg_config)
-PGSQL_VER!= ${LOCALBASE}/bin/pg_config --version | ${SED} -n 's/PostgreSQL[^0-9]*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\..*/\1\2/p'
.else
PGSQL_VER= ${DEFAULT_PGSQL_VER}
-.endif # WANT_PGSQL_VER
+.endif
# And now we are checking if we can use it
.if exists(${PORTSDIR}/databases/postgresql${PGSQL_VER}-client)
.if defined(BROKEN_WITH_PGSQL)
. for VER in ${BROKEN_WITH_PGSQL}
. if (${PGSQL_VER} == "${VER}")
-BROKEN= "Doesn't work with PostgreSQL version : ${PGSQL_VER} (Doesn't support PostgresSQL ${BROKEN_WITH_PGSQL})"
+IGNORE= "Does not work with postgresql${PGSQL_VER}-client PostgresSQL \(${BROKEN_WITH_PGSQL} not supported\)"
. endif
. endfor
.endif # BROKEN_WITH_PGSQL
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list