Created attachment 157340 [details] Try to use installed postgresql-client version before falling back to PGSQL_DEFAULT Currently PGSQL_DEFAULT is 9.3. When a different version of postgresql-client is installed (e.g. 9.0) and port has pgsql:9.0+ pgsql.mk select a default version instead of installed version. Example: fjoe@slinky:/usr/ports/databases/pgadmin3 % make ===> pgadmin3-1.20.0 cannot install: the port wants postgresql-client version 9.0 9.1 9.2 9.3 9.4 and you have version 9.0 installed. *** Error code 1 Stop. make: stopped in /usr/ports/databases/pgadmin3 fjoe@slinky:/usr/ports/databases/pgadmin3 % pkg info | grep postgresql postgresql90-client-9.0.18 PostgreSQL database (client) fjoe@slinky:/usr/ports/databases/pgadmin3 % This happens because _WANT_PGSQL_VER code in pgsql.mk does not take into account the installed version and always tries to use PGSQL_DEFAULT.
I had to revert pgadmin3 to IGNORE_WITH_PGSQL because users started to complain that the build breaks if they have non-default postgresql-client installed (similar to mine breakage): ===> pgadmin3-1.20.0 cannot install: the port wants postgresql-client version 9.0 9.1 9.2 9.3 9.4 and you have version 9.4 installed. *** Error code 1
See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204031 It appears that Postgresql is no longer maintained? This issue is nearly 6 months running. :( Won't this issue affect a great many ports?
Hi, I have not seen this problem at all, and I'm running 9.4. Did you set DEFAULT_VERSIONS= pgsql=9.4 in /etc/make.conf? Perhaps this is not properly documented? The DEFAULT_VERSIONS is not exclusive to PostgreSQL though. Palle
A commit references this bug: Author: fjoe Date: Wed Feb 10 12:18:20 UTC 2016 New revision: 408625 URL: https://svnweb.freebsd.org/changeset/ports/408625 Log: Prefer installed version instead of insisting on using default version. PR: 200569 Changes: head/Mk/Uses/pgsql.mk
*** Bug 204031 has been marked as a duplicate of this bug. ***
A commit references this bug: Author: fjoe Date: Thu Mar 17 12:09:39 UTC 2016 New revision: 411273 URL: https://svnweb.freebsd.org/changeset/ports/411273 Log: Fix installed version check on FreeBSD 9. PR: 200569 Changes: head/Mk/Uses/pgsql.mk