Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Jan 2017 14:18:41 -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:  <B3F0D531-7242-49A8-8D1C-75E4D9DDF984@gromit.dlib.vt.edu>
In-Reply-To: <63933012-A522-4E9C-8968-FD418867047C@alogis.com>
References:  <877F58D1-9D84-48D7-BC74-BC20170E901A@alogis.com> <1B1319FA-B572-4947-88DD-E8B708320CB8@gromit.dlib.vt.edu> <63933012-A522-4E9C-8968-FD418867047C@alogis.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Jan 13, 2017, at 10:19 AM, Holger Kipp <Holger.Kipp@alogis.com> =
wrote:

> Dear Paul,
>=20
>> Am 13.01.2017 um 15:49 schrieb Paul Mather <paul@gromit.dlib.vt.edu =
<mailto:paul@gromit.dlib.vt.edu>>:
>>=20
>> On Jan 13, 2017, at 9:24 AM, Holger Kipp <Holger.Kipp@alogis.com =
<mailto:Holger.Kipp@alogis.com>> wrote:
>>=20
>>> 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.
>>=20
>>=20
>> 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.
>>=20
>> 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.
>>=20
>>=20
>>> 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?
>>=20
>>=20
>> 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.
>>=20
>> 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.
>>=20
>> Another way to rectify it is to build your own ports using something =
like Poudriere.
>=20
> Thank you very much for the good explanation. I=E2=80=99ll go with the =
DEFAULT_VERSIONS-Setting in make.conf then.
> Is there a list of dependencies for the FreeBSD repository so I can =
check if my system is also affected there?


I'm not sure if this is what you're asking, but one thing you can do is =
query the FreeBSD packages repository for such information.  See "pkg =
help rquery" for details.  E.g., to see what packages (and versions) the =
p5-DBD-Pg package depends upon, use the following command:

	pkg rquery %dn-%dv p5-DBD-Pg

Currently, this returns:

	p5-DBI-1.636
	perl5-5.24.1.r4_1
	postgresql93-client-9.3.15_1

To see which packages potentially are affected by manually installing a =
different version of PostgreSQL (i.e., those packages that depend upon =
postgresql93-client), use the following command:

	pkg rquery %ro postgresql93-client

This currently returns a list of 115 packages.

Note also that the standard FreeBSD package repository distributed with =
recent releases is based upon the "quarterly" ports tree.  Make sure you =
use the same source in your local /usr/ports, otherwise you have scope =
for even more divergence between your local ports being built and the =
ones you're using from the official FreeBSD package repository.  =
Alternatively, you could point your FreeBSD.conf pkg repo to "latest" to =
make /usr/ports match up.

Cheers,

Paul.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B3F0D531-7242-49A8-8D1C-75E4D9DDF984>