Re: pkg upgrade odity

From: Baptiste Daroussin <bapt_at_freebsd.org>
Date: Mon, 29 Apr 2024 15:21:30 UTC
On Mon 29 Apr 16:41, Miroslav Lachman wrote:
> On 29/04/2024 12:49, Alexander Leidinger wrote:
> > Hi,
> > 
> > pkg wants to remove some package on upgrade. I do not understand why...
> > ---snip---
> > # pkg upgrade
> > Updating FreeBSD repository catalogue...
> > Fetching meta.conf: 100%    178 B   0.2kB/s    00:01
> > Fetching data.pkg: 100%  130 KiB 133.5kB/s    00:01
> > Processing entries: 100%
> > FreeBSD repository update completed. 467 packages processed.
> > All repositories are up to date.
> > Checking for upgrades (1 candidates): 100%
> > Processing candidates (1 candidates): 100%
> > The following 4 package(s) will be affected (of 0 checked):
> > 
> > Installed packages to be REMOVED:
> >          mosh: 1.4.0_2
> >          netdata: 1.43.2_1
> >          protobuf: 24.4,1
> > 
> > Installed packages to be UPGRADED:
> >          rsync: 3.2.7_1 -> 3.3.0
> > 
> > Number of packages to be removed: 3
> > Number of packages to be upgraded: 1
> > 
> > The operation will free 55 MiB.
> > 405 KiB to be downloaded.
> > 
> > Proceed with this action? [y/N]: n
> > ---snip---
> > 
> > If I do this instead, it is doing what I expect the former command to do:
> > ---snip---
> > # pkg upgrade mosh netdata protobuf rsync
> > Updating FreeBSD repository catalogue...
> > FreeBSD repository is up to date.
> > All repositories are up to date.
> > The following 1 package(s) will be affected (of 0 checked):
> > 
> > Installed packages to be UPGRADED:
> >          rsync: 3.2.7_1 -> 3.3.0
> > 
> > Number of packages to be upgraded: 1
> > 
> > 405 KiB to be downloaded.
> > 
> > Proceed with this action? [y/N]:
> > ---snip---
> > 
> > Any ideas why it wants to remove those packages in the first case?
> 
> 
> I see similar behavior from time to time. Last time (a few days ago) pkg
> wanted to uninstall about 30 packages when I tried to install Signal Desktop
> (I tried to install another package without any dependencies, but pkg
> behaves the same). I didn't have time to solve it, I just left it alone. The
> second day (after reboot) everything worked normally and pkg installed only
> Signal Desktop, no other dependencies/libraries were affected.
> 
> And similarly, pkg during 'pkg upgrade' installed several packages, which
> after completing 'pkg upgrade' again uninstalled by command 'pkg autoremove'
> (I remember mate-desktop, which I don't use at all, I use KDE Plasma) It was
> right before I tried to install Signal Desktop.
> 
> 
> Kind regards
> Miroslav Lachman
> 
> 

This is usually due to shlibs_provided and shlibs_required,, pkg check -d should
be able to highlight some of the issues

Best regards,
Bapt