[Bug 270157] ports-mgmt/portupgrade: with portupgrade -P install of ports-mgmt/pkg fails

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 23 Sep 2023 21:48:53 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270157

--- Comment #4 from Fabian Wenk <fabian@wenks.ch> ---
(In reply to Baptiste Daroussin from comment #2)

Running on the build system (where the port is build from source) with:

portupgrade -pa

this gets logged into syslog:
Sep 22 20:15:42 riddler pkg[59460]: webp-1.3.1_1 deinstalled
Sep 22 20:15:44 riddler pkg-static[59708]: webp-1.3.2 installed

And running on any of the other systems (where an available pre-built package
is taken) with:

portupgrade -kPa

this gets logged into syslog:
Sep 22 20:44:48 batman pkg[4699]: webp-1.3.1_1 deinstalled
Sep 22 20:44:49 batman pkg[4728]: webp-1.3.2 installed

Usually this does not make a difference, unless there is an update for
ports-mgmt/pkg itself. On the build system it works just fine, but then fails
on the other systems and leaves them in a broken state where ports-mgmt/pkg is
removed.  
The only way out of this is with a local manual build like this:
cd /usr/ports/ports-mgmt/pkg
make install

So my (slightly rewritten) question from the original report still stands:
Why is 'portupgrade -P' using 'pkg' instead of 'pkg-static' when upgrading from
a package instead of a locally done build?

Some other thoughts, could it be that portupgrade is taking different steps /
commands when run with -P during install from a local build or a package? So
what I see in syslog with the 'pkg' and 'pkg-static' is just a coincident?

-- 
You are receiving this mail because:
You are the assignee for the bug.