On Jan 13, 2017, at 10:19 AM, Holger Kipp <holger.k...@alogis.com> wrote:

> Dear Paul,
> 
>> Am 13.01.2017 um 15:49 schrieb Paul Mather <p...@gromit.dlib.vt.edu 
>> <mailto:p...@gromit.dlib.vt.edu>>:
>> 
>> On Jan 13, 2017, at 9:24 AM, Holger Kipp <holger.k...@alogis.com 
>> <mailto:holger.k...@alogis.com>> wrote:
>> 
>>> Dear all,
>>> 
>>> 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.
>>> 
>>> 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:~ #
>>> 
>>> All Ports were originally installed from source but with default config.
>>> 
>>> --------
>>> 
>>> Now pkg upgrade wants to install postgresql-client 9.3.15_1:
>>> 
>>> 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):
>>> 
>>> New packages to be INSTALLED:
>>>       postgresql93-client: 9.3.15_1
>>> 
>>> 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)
>>> 
>>> Number of packages to be installed: 1
>>> Number of packages to be reinstalled: 2
>>> 
>>> The process will require 9 MiB more space.
>>> 2 MiB to be downloaded.
>>> 
>>> Proceed with this action? [y/N]:
>>> 
>>> --------
>>> 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+= pgsql=9.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.
> 
> Thank you very much for the good explanation. I’ll 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.
_______________________________________________
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"

Reply via email to