Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Aug 2018 00:21:31 +0200
From:      Miroslav Lachman <000.fbsd@quip.cz>
To:        freebsd-ports@freebsd.org
Subject:   pkg upgrade installs and then deinstalls package in one run
Message-ID:  <79ac7fd8-c6af-fb15-7fe7-234aae2ebc77@quip.cz>

next in thread | raw e-mail | index | archive | help
I have two repositories configured on this machine. There are PostgreSQL 
9.6 and 9.4 packages available.
Only PostgreSQL 9.4 packages (server, client, contrib) are installed.
When I run "pkg upgrade" of all installed packages, the system is not 
working anymore:

Shared object "libpq.so.5" not found, required by "pg_ctl"

pkg info says there are all PG packages installed:

(root@yamaha) ~/# pkg info postgresql94-\*
postgresql94-client-9.4.19
postgresql94-contrib-9.4.19
postgresql94-server-9.4.19

But they are not completed. Files are missing

(root@yamaha) ~/# pkg check -B postgresql94-client-9.4.19 
postgresql94-contrib-9.4.19 postgresql94-server-9.4.19Checking 
postgresql94-client-9.4.19:
pkg: fstat() failed for(/usr/local/bin/clusterdb): No such file or directory
pkg: fstat() failed for(/usr/local/bin/createdb): No such file or directory
pkg: fstat() failed for(/usr/local/bin/createlang): No such file or 
directory
pkg: fstat() failed for(/usr/local/bin/createuser): No such file or 
directory
pkg: fstat() failed for(/usr/local/bin/dropdb): No such file or directory
pkg: fstat() failed for(/usr/local/bin/droplang): No such file or directory
pkg: fstat() failed for(/usr/local/bin/dropuser): No such file or directory
pkg: fstat() failed for(/usr/local/bin/ecpg): No such file or directory
pkg: fstat() failed for(/usr/local/bin/pg_config): No such file or directory
..
..
Checking postgresql94-contrib-9.4.19: 100%
Checking postgresql94-server-9.4.19:   0%
(postgresql94-server-9.4.19) /usr/local/bin/pg_basebackup - required 
shared library libpq.so.5 not found
(postgresql94-server-9.4.19) /usr/local/bin/pg_ctl - required shared 
library libpq.so.5 not found
(postgresql94-server-9.4.19) /usr/local/bin/pg_receivexlog - required 
shared library libpq.so.5 not found
(postgresql94-server-9.4.19) /usr/local/bin/pg_recvlogical - required 
shared library libpq.so.5 not found
(postgresql94-server-9.4.19) 
/usr/local/lib/postgresql/libpqwalreceiver.so - required shared library 
libpq.so.5 not found
Checking postgresql94-server-9.4.19: 100%


So I tried to reinstall (upgrade) the client

(root@yamaha) ~/# pkg upgrade -f postgresql94-client
Updating codelab repository catalogue...
codelab repository is up to date.
Updating e2py3 repository catalogue...
e2py3 repository is up to date.
All repositories are up to date.
Checking integrity... done (5 conflicting)
   - postgresql96-client-9.6.10 [codelab] conflicts with 
postgresql94-client-9.4.19 [codelab] on /usr/local/bin/clusterdb
   - postgresql96-client-9.6.10 [codelab] conflicts with 
postgresql94-client-9.4.19 [installed] on /usr/local/bin/clusterdb
   - postgresql96-client-9.6.10 [e2py3] conflicts with 
postgresql94-client-9.4.19 [codelab] on /usr/local/bin/clusterdb
   - postgresql96-client-9.6.10 [codelab] conflicts with 
postgresql94-contrib-9.4.19 [installed] on /usr/local/bin/pgbench
   - postgresql96-client-9.6.10 [e2py3] conflicts with 
postgresql94-contrib-9.4.19 [installed] on /usr/local/bin/pgbench
Checking integrity... done (0 conflicting)
The following 1 package(s) will be affected (of 0 checked):

Installed packages to be REINSTALLED:
         postgresql94-client-9.4.19 [codelab]

Number of packages to be reinstalled: 1

Proceed with this action? [y/N]: y
Installing postgresql94-client-9.4.19...
Extracting postgresql94-client-9.4.19: 100%
[1/1] Deinstalling postgresql94-client-9.4.19...
[1/1] Deleting files for postgresql94-client-9.4.19: 100%


1) Why it check anything about conflict with 96 if there is only 94 
installed?

2) Why  postgresql94-client-9.4.19 is deinstalled right after it was 
installed?
     Are my pkg on drugs or what?

This setup was working for a long time. Both repositories are build on 
our Poudriere. Nothing was changed on this machine nor Poudriere 
builder, just update of ports tree and new run of "poudriere bulk" so I 
expected to have PG 9.4 updated from 9.4.18 to 9.4.19 which is what is 
logged in pkg log:

(root@yamaha) ~/# egrep 'Aug 25 .*postgres' /var/log/pkg.log
Aug 25 23:53:44 yamaha pkg: postgresql94-client-9.4.19 installed
Aug 25 23:53:48 yamaha pkg: postgresql94-client-9.4.18 deinstalled
Aug 25 23:54:02 yamaha pkg: postgresql94-server upgraded: 9.4.18 -> 9.4.19
Aug 25 23:54:02 yamaha pkg: postgresql94-contrib-9.4.19 installed
Aug 25 23:54:13 yamaha pkg: postgresql94-contrib-9.4.18 deinstalled

But the steps are in wrong order. 9.4.19 should not be installed prior 
to 9.4.18 is deinstalled.

And then I really don't understand why it is failing on the same version 
forced upgrade / reinstall:

(root@yamaha) ~/# egrep 'Aug 26 .*postgres' /var/log/pkg.log
Aug 26 00:00:55 yamaha pkg: postgresql94-client-9.4.19 installed
Aug 26 00:00:55 yamaha pkg: postgresql94-client-9.4.19 deinstalled
Aug 26 00:01:18 yamaha pkg: postgresql94-contrib-9.4.19 installed
Aug 26 00:01:18 yamaha pkg: postgresql94-contrib-9.4.19 deinstalled
Aug 26 00:01:36 yamaha pkg: postgresql94-server reinstalled: 9.4.19 -> 
9.4.19

This is on FreeBSD 10.4-RELEASE-p9 amd64 GENERIC with pkg version 1.10.5

Kind regards
Miroslav Lachman




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?79ac7fd8-c6af-fb15-7fe7-234aae2ebc77>