Re: pkg upgrade odity

From: Baptiste Daroussin <bapt_at_FreeBSD.org>
Date: Tue, 30 Apr 2024 20:21:59 UTC
Le 30 avril 2024 13:18:41 GMT+02:00, Alexander Leidinger <Alexander@Leidinger.net> a écrit :
>Am 2024-04-29 17:21, schrieb Baptiste Daroussin:
>> 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
>
>In my case it complains about missing shared libs for exactly those ports which it wants to deinstall, but they are present in the system...
>---snip---
> # pkg check -da
>Checking all packages: 100%
>mosh is missing a required shared library: libabsl_time_zone.so.2301.0.0
>mosh is missing a required shared library: libabsl_time.so.2301.0.0
>mosh is missing a required shared library: libabsl_throw_delegate.so.2301.0.0
>mosh is missing a required shared library: libabsl_synchronization.so.2301.0.0
>mosh is missing a required shared library: libabsl_symbolize.so.2301.0.0
>mosh is missing a required shared library: libabsl_strings_internal.so.2301.0.0
>mosh is missing a required shared library: libabsl_strings.so.2301.0.0
>mosh is missing a required shared library: libabsl_strerror.so.2301.0.0
>mosh is missing a required shared library: libabsl_str_format_internal.so.2301.0.0
>mosh is missing a required shared library: libabsl_statusor.so.2301.0.0
>mosh is missing a required shared library: libabsl_status.so.2301.0.0
>mosh is missing a required shared library: libabsl_stacktrace.so.2301.0.0
>mosh is missing a required shared library: libabsl_spinlock_wait.so.2301.0.0
>mosh is missing a required shared library: libabsl_raw_logging_internal.so.2301.0.0
>mosh is missing a required shared library: libabsl_raw_hash_set.so.2301.0.0
>netdata is missing a required shared library: libabsl_time_zone.so.2301.0.0
>netdata is missing a required shared library: libabsl_time.so.2301.0.0
>netdata is missing a required shared library: libabsl_throw_delegate.so.2301.0.0
>netdata is missing a required shared library: libabsl_synchronization.so.2301.0.0
>netdata is missing a required shared library: libabsl_symbolize.so.2301.0.0
>netdata is missing a required shared library: libabsl_strings_internal.so.2301.0.0
>netdata is missing a required shared library: libabsl_strings.so.2301.0.0
>netdata is missing a required shared library: libabsl_strerror.so.2301.0.0
>netdata is missing a required shared library: libabsl_str_format_internal.so.2301.0.0
>netdata is missing a required shared library: libabsl_statusor.so.2301.0.0
>netdata is missing a required shared library: libabsl_status.so.2301.0.0
>netdata is missing a required shared library: libabsl_stacktrace.so.2301.0.0
>netdata is missing a required shared library: libabsl_spinlock_wait.so.2301.0.0
>netdata is missing a required shared library: libabsl_raw_logging_internal.so.2301.0.0
>netdata is missing a required shared library: libabsl_raw_hash_set.so.2301.0.0
>protobuf is missing a required shared library: libabsl_time_zone.so.2301.0.0
>protobuf is missing a required shared library: libabsl_time.so.2301.0.0
>protobuf is missing a required shared library: libabsl_throw_delegate.so.2301.0.0
>protobuf is missing a required shared library: libabsl_synchronization.so.2301.0.0
>protobuf is missing a required shared library: libabsl_symbolize.so.2301.0.0
>protobuf is missing a required shared library: libabsl_strings_internal.so.2301.0.0
>protobuf is missing a required shared library: libabsl_strings.so.2301.0.0
>protobuf is missing a required shared library: libabsl_strerror.so.2301.0.0
>protobuf is missing a required shared library: libabsl_str_format_internal.so.2301.0.0
>protobuf is missing a required shared library: libabsl_statusor.so.2301.0.0
>protobuf is missing a required shared library: libabsl_status.so.2301.0.0
>protobuf is missing a required shared library: libabsl_stacktrace.so.2301.0.0
>protobuf is missing a required shared library: libabsl_spinlock_wait.so.2301.0.0
>protobuf is missing a required shared library: libabsl_raw_logging_internal.so.2301.0.0
>protobuf is missing a required shared library: libabsl_raw_hash_set.so.2301.0.0
>
># locate libabsl_time.so.2301.0.0
>/usr/local/lib/libabsl_time.so.2301.0.0
>
># ll /usr/local/lib/libabsl_time.so.2301.0.0
>-rwxr-xr-x  1 root wheel   68K 22 Dez. 19:38 /usr/local/lib/libabsl_time.so.2301
>
># pkg which /usr/local/lib/libabsl_time_zone.so.2301.0.0
>/usr/local/lib/libabsl_time_zone.so.2301.0.0 was installed by package abseil-20230125.3
>
># pkg show abseil | head
>abseil-20230125.3
>Name           : abseil
>Version        : 20230125.3
>Installed on   : Tue Dec 26 23:37:59 2023 UTC
>Origin         : devel/abseil
>Architecture   : FreeBSD:15:amd64
>Prefix         : /usr/local
>Categories     : devel
>Licenses       : APACHE20
>Maintainer     : danfe@FreeBSD.org
>---snip---
>
>Does this sound like "pkg check -B" would help here?
>
>Bye,
>Alexander.
>

Not at all! I need the output of pkg info -R --raw-format ucl abseil

This is a real issue on your system, which usually comes from local building, is it your case?

Best regards,
Bapt