Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Oct 2023 15:12:13 -0700
From:      "Dan Mahoney (Ports)" <freebsd@gushi.org>
To:        ports@freebsd.org
Subject:   Another morning lost to bad ports choices (perl upgrade, plus postgres)
Message-ID:  <034BDF27-C9FC-4EBC-901E-21A4BB81AF31@gushi.org>

next in thread | raw e-mail | index | archive | help
All,

I=E2=80=99ve lost another morning to a bad choice made by ports/pkg.

Maybe this is a dumb question/rant, but recently, a routine pkg upgrade =
of the dayjob=E2=80=99s RT VM (which included an upgrade to perl) =
decided to leave me with no ability to connect.  After following the =
rabbit hole, I hit a database connect error.

p5-dbd-pg was still installed, according to pkg, but none of the perl =
libraries could find it, because it was in the wrong perl include dir =
(/usr/local/lib/perl5/site_perl/mach/5.32/DBD/Pg.pm, when the perl =
version was 5.34)

Now, postgresql13 is still in pkg, still works, and according to =
Freshports indirectly requires postgresql13 (by way of requining libpq), =
and it still builds cleanly if you set DEFAULT_VERSIONS+=3Dpgsql=3D13 in =
make.conf,=20

But apparently, if you use pkg, and you try to decide you need the perl =
driver, you=E2=80=99re boned.  But should you attempt to just reinstall =
it?  Nope.

# pkg install p5-DBD-Pg
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (2 conflicting)
 - postgresql15-client-15.4 conflicts with postgresql13-client-13.12 on =
/usr/local/bin/clusterdb
 - postgresql15-client-15.4 conflicts with postgresql13-client-13.12 on =
/usr/local/bin/clusterdb
Checking integrity... done (0 conflicting)
The following 5 package(s) will be affected (of 0 checked):

Installed packages to be REMOVED:
       postgresql13-client: 13.12
       postgresql13-server: 13.12

New packages to be INSTALLED:
       postgresql15-client: 15.4

Installed packages to be UPGRADED:
       p5-DBD-Pg: 3.16.0 -> 3.17.0

Installed packages to be REINSTALLED:
       pkg-1.20.8

=3D=3D=3D

Also, I love how it doesn=E2=80=99t offer to upgrade the server as well. =
 Who needs that thing?

So the point of view is apparently =E2=80=9Cyeah, you can install a =
whole big postgres server/client, and a big language like perl, and all =
the dependencies for something complicated like RT without having a full =
ports tree, but if you try to install the tiny little stub that lets =
perl talk to that database, HAHA nope."

This happened a year ago, too.  It=E2=80=99s not freebsd=E2=80=99s fault =
that Postgres requires a full dump and restore of all your databases to =
do an upgrade (where mysql handles major version upgrades just fine), =
but the version bumps should be cognizant  of this.

My fix for this was *sigh* portsnap fetch updete, cd =
/usr/ports/databases/p5-dbd-Pg, make, make deinstall, make =
reinstall=E2=80=A6pkg lock p5-dbd-Pg

Yes, I know that I should be ready to upgrade to 15 at some point, on =
whatever quarterly port boundary it=E2=80=99s decided, =E2=80=9CI guess =
that=E2=80=99s when=E2=80=9D, with no advance notice, via the full =
stupid dump-and-restore process.

I don=E2=80=99t run =E2=80=9Cpkg upgrade=E2=80=9D because I=E2=80=99m =
interested in the exercise of debugging the latest ports shenanigans, I =
run it because =E2=80=9Cpkg audit=E2=80=9D complains at me about =
vulnerable things, and in general it=E2=80=99s good to keep things up to =
speed

But once in a while, I lose a whole morning to nonsense like this, and =
it feels preventable.

-Dan=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?034BDF27-C9FC-4EBC-901E-21A4BB81AF31>