From owner-freebsd-stable@freebsd.org Fri Jan 13 14:42:17 2017 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F30ACAEC7A for ; Fri, 13 Jan 2017 14:42:17 +0000 (UTC) (envelope-from paul@gromit.dlib.vt.edu) Received: from gromit.dlib.vt.edu (gromit.dlib.vt.edu [128.173.126.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "gromit.dlib.vt.edu", Issuer "Chumby Certificate Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0E1001B91 for ; Fri, 13 Jan 2017 14:42:16 +0000 (UTC) (envelope-from paul@gromit.dlib.vt.edu) Received: from pmather.lib.vt.edu (pmather.lib.vt.edu [128.173.126.193]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by gromit.dlib.vt.edu (Postfix) with ESMTPSA id A529E7A9; Fri, 13 Jan 2017 09:42:08 -0500 (EST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: pkg upgrade wants to install old postgresql-client-version. why? From: Paul Mather In-Reply-To: <877F58D1-9D84-48D7-BC74-BC20170E901A@alogis.com> Date: Fri, 13 Jan 2017 09:42:08 -0500 Cc: "freebsd-stable@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <1B1319FA-B572-4947-88DD-E8B708320CB8@gromit.dlib.vt.edu> References: <877F58D1-9D84-48D7-BC74-BC20170E901A@alogis.com> To: Holger Kipp X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 14:42:17 -0000 On Jan 13, 2017, at 9:24 AM, Holger Kipp wrote: > Dear all, >=20 > I have a little FreeBSD system upgraded from 10.2-p24 to 10.3-p11. = GENERIC Kernel. > This also included upgrading postgresql from 9.5.4 to 9.5.5_1. and = about 220 other ports. > Most were upgraded using pkg upgrade, but postgresql had to be = upgraded using the manual > make, make package, make deinstall && make reinstall. >=20 > root@gw2:~ # pkg info | grep postgresql > postgresql95-client-9.5.5_1 PostgreSQL database (client) > postgresql95-contrib-9.5.5 The contrib utilities from the = PostgreSQL distribution > postgresql95-server-9.5.5_1 PostgreSQL is the most advanced = open-source database available anywhere > root@gw2:~ # >=20 > All Ports were originally installed from source but with default = config. >=20 > -------- >=20 > Now pkg upgrade wants to install postgresql-client 9.3.15_1: >=20 > root@gw2:~ # pkg upgrade > Updating FreeBSD repository catalogue... > FreeBSD repository is up-to-date. > All repositories are up-to-date. > Checking for upgrades (28 candidates): 100% > Processing candidates (28 candidates): 100% > The following 3 package(s) will be affected (of 0 checked): >=20 > New packages to be INSTALLED: > postgresql93-client: 9.3.15_1 >=20 > Installed packages to be REINSTALLED: > p5-Pg-2.1.1_4,1 (direct dependency changed: perl5) > p5-DBD-Pg-3.5.3 (direct dependency changed: p5-DBI) >=20 > Number of packages to be installed: 1 > Number of packages to be reinstalled: 2 >=20 > The process will require 9 MiB more space. > 2 MiB to be downloaded. >=20 > Proceed with this action? [y/N]: >=20 > -------- > My programs using p5-Pg or p5-DBD-Pg seem to work just fine, and perl5 = has current version perl5-5.24.1.r4_1. > However I had to reinstall both packages manually because they were = not properly working after upgrade via pkg upgrade. You are using the official FreeBSD packages for your upgrade. They are = built with postgresql93 as the default version of PostgreSQL. Thus, = p5-Pg and p5-DBD-Pg will both have a dependency on the postgresql-client = packages (for libraries allowing them to interface with PostgreSQL = servers), which, in the FreeBSD repository, is postgresql93-client. Because postgresql93-client conflicts with postgresql95-client, it will = try and uninstall the latter when trying to satisfy the = postgresql93-client dependency. The same will be true of any other = package you try and use from the FreeBSD repository that has a = dependency upon PostgreSQL. > How can I check where from pkg upgrade gets the idea to install old = 9.3.15_1 postgresql client? > And is there a way to rectify this? I would imagine that, like you did with the PostgreSQL 9.5 ports, you = would also have to build and reinstall p5-Pg and p5-DBD-Pg manually, = too. Be sure to add "DEFAULT_VERSIONS+=3D pgsql=3D9.5" or otherwise = amend your DEFAULT_VERSIONS setting in /etc/make.conf before building so = that p5-Pg and p5-DBD-Pg depend upon the version of PostgreSQL you want. Mixing custom local ports and stock ports from the FreeBSD official = packages repository will often lead to these sorts of problems, due to = differences in build options and such. Another way to rectify it is to build your own ports using something = like Poudriere. Cheers, Paul.