Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Jan 2017 09:42:08 -0500
From:      Paul Mather <paul@gromit.dlib.vt.edu>
To:        Holger Kipp <Holger.Kipp@alogis.com>
Cc:        "freebsd-stable@freebsd.org" <freebsd-stable@freebsd.org>
Subject:   Re: pkg upgrade wants to install old postgresql-client-version. why?
Message-ID:  <1B1319FA-B572-4947-88DD-E8B708320CB8@gromit.dlib.vt.edu>
In-Reply-To: <877F58D1-9D84-48D7-BC74-BC20170E901A@alogis.com>
References:  <877F58D1-9D84-48D7-BC74-BC20170E901A@alogis.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Jan 13, 2017, at 9:24 AM, Holger Kipp <Holger.Kipp@alogis.com> 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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1B1319FA-B572-4947-88DD-E8B708320CB8>