From owner-freebsd-ports@freebsd.org Sat Aug 25 22:21:55 2018 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EA841097D79 for ; Sat, 25 Aug 2018 22:21:55 +0000 (UTC) (envelope-from SRS0=wecS=LI=quip.cz=000.fbsd@elsa.codelab.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E2C3840DB for ; Sat, 25 Aug 2018 22:21:54 +0000 (UTC) (envelope-from SRS0=wecS=LI=quip.cz=000.fbsd@elsa.codelab.cz) Received: from elsa.codelab.cz (localhost [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id B0D8128412 for ; Sun, 26 Aug 2018 00:21:46 +0200 (CEST) Received: from illbsd.quip.test (ip-86-49-16-209.net.upcbroadband.cz [86.49.16.209]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id F12D02840C for ; Sun, 26 Aug 2018 00:21:31 +0200 (CEST) To: freebsd-ports@freebsd.org From: Miroslav Lachman <000.fbsd@quip.cz> Subject: pkg upgrade installs and then deinstalls package in one run Message-ID: <79ac7fd8-c6af-fb15-7fe7-234aae2ebc77@quip.cz> Date: Sun, 26 Aug 2018 00:21:31 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Aug 2018 22:21:55 -0000 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