Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Aug 2022 20:25:15 +0000
From:      Andreas Ott <andreas@naund.org>
To:        freebsd-current@freebsd.org
Subject:   updating of prebuilt packages with pkg
Message-ID:  <20220812202515.GC1876@naund.org>

next in thread | raw e-mail | index | archive | help
I am not sure if this issue is more for -stable or -ports, so I start
here. The visible problem was that after 'pkg upgrade' certbot stopped
working.

I am running systems that after initial install do binary-only upgrades
for both core and ports with freebsd-update(8) and pkg(8). I do not have
the /usr/src/ or /usr/ports/ trees installed in order to save space. For 
policy reasons these use pre-built packages and I will never compile 
anything from source on these systems. This one is on 12.3-RELEASE .

Recently I encountered that the usual cadence of

pkg update
pkg upgraade
pkg autoremove
pkg clean

left me with several packages in state "?". 

$ pkg version |grep \?  
[...]
py38-acme-1.22.0,1                 ?
py38-certbot-1.22.0,1              ?
[...]
ruby27-bdb-0.6.6_8                 ?

which tells me that these have been superseded by something else.

Tracking this down on a system that does have /usr/ports installed I
could find in /usr/ports/UPDATING that in my example the default version
of python had been upgraded, see entry
20220626:
  AFFECTS: users of python
[...]
  For users of pre-build packages:
  # sh
  # for i in $(pkg query -g %n 'py38-*'); do pkg set -yn ${i}:py39-${i#py38-}; done
  # pkg upgrade
[...]

How would a user of pre-built packages find out about the need to run the
'pkg set' command? The dependency and integrity solver in pkg did not show 
any notices about it. An example would be p7zip.

I believe a similar issue exists if a port gets removed entirely, in which
case a previously installed package shows in state "?". No notification
is given by pkg about the fact that is was deprecated.

Using the instructions above I was able to get back to a working certbot.

In the case of ruby27 the pkg commands above handled this gracefully
on its own, see /usr/ports/UPDATING entry from 20220421 
"ruby: 2.7.x -> 3.0.4_2,1".


Thanks, andreas
-- 
andreas@naund.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20220812202515.GC1876>