Upgrading discontinued ports

Matthew Seaman matthew at FreeBSD.org
Mon Mar 11 09:52:02 UTC 2019


On 11/03/2019 06:48, Dirk Engling wrote:
> On 11.03.19 04:56, Robert Ayrapetyan wrote:
> 
>> Are you sure you've used a "force" flag, e.g. "pkg-static upgrade
>> -f"?
> Yes. But all that does is force reinstall installed packages. However
> the old package just isn't in the pkg repo anymore, so there's nothing
> to re-install.

pkg(8) does know about successor packages for many of these cases, but 
only for what is mentioned in MOVED.

Unfortunately, in the specific case of upgrading from php56 to php72, 
pkg(8) has no idea of the equivalence between php56-foo and php72-foo 
packages.  All it knows is that php56-foo and php72-foo conflict on 
installation, so when you install an updated php application compiled to 
depend on php72 modules it will install the php72 dependencies for that 
application, replacing the php56 equivalents.  If you've still got php56 
modules left over, then one of two things has happened.  Either you've 
installed a php56 module directly, because (for instance) it was needed 
by some not-packaged PHP application you're running, or else you've 
still got an old version of some PHP app package installed that still 
depends on those php56 modules.  It's usually fairly easy to sort either 
of those two situations out, but it does require manual intervention.

The best approach here is to run:

    pkg version -vRL=

whenever you're doing an upgrade with a significant change to something 
with a big module library (PHP, perl, python, etc).  This should 
highlight anything you have installed with no corresponding package in 
the repo, so that you can take appropriate action.

	Cheers,

	Matthew




More information about the freebsd-hackers mailing list