Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(pkg autoremove removes shlibs) Stealth dependencies not tracked. #1015

Closed
DarkHelmet433 opened this issue Sep 16, 2014 · 7 comments
Closed

Comments

@DarkHelmet433
Copy link
Member

In the freebsd.org cluster we have sysutils/condor as a poudriere package (with default options).

sysutil/condor brings in devel/cmake
cmake brings in libexpat.so.6
the condor auto config script detects and uses libexpat.so.6

pkg can see this:
$ pkg query '%o %B' | grep expat
sysutils/condor libexpat.so.6
$ pkg query '%o %b' | grep expat
textproc/expat2 libexpat.so.6
$ pkg query '%o %dn' | grep condor | grep expat
$

Note, no dependency. However, at install time:

$ pkg install condor
The following 2 packages will be affected (of 0 checked):

New packages to be INSTALLED:
condor: 8.0.3
expat: 2.1.0_1

.. and they are installed. Then a 'pkg autoremove':
$ pkg autoremove
Deinstallation has been requested for the following 1 packages:

Installed packages to be REMOVED:
expat-2.1.0_1

Which upsets pkg check -Ba and the binaries themselves.
$ pkg check -Ba
Checking all packages: 13%
pkg: (condor-8.0.3) /usr/local/bin/condor_check_userlogs - required shared library libexpat.so.6 not found
...

A 'pkg upgrade -f' does not bring it back, like it did the first time when installing remotely. If I do a 'pkg delete condor ; pkg install condor' it will bring expat back temporarily.

Obviously the port itself is at fault, but I find the pkg behavior rather astonishing. It looks like it understands the logic to make the dependency via shlib work, but doesn't quite follow through.

I tested this on a live freebsd-11 system and can reproduce it with:
rm -rf /usr/local /var/db/pkg
pkg install condor
pkg autoremove
-> leaves the system broken.

@bdrewery bdrewery changed the title Stealth dependencies not tracked. (pkg autoremove removes shlibs) Stealth dependencies not tracked. Oct 16, 2014
@silenius
Copy link

silenius commented May 5, 2015

It looks like I'm facing the same problem with pkg 1.5.1: https://gist.github.com/silenius/505370d7cff80659f148

@bapt
Copy link
Member

bapt commented May 5, 2015

yes that also means mapserver is missing an explicit dependency
but yes autoremove should learn about shlibs and requires in general

@bdrewery
Copy link
Member

This is still a problem with 1.5.5

~ # pkg install mtr
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
The following 2 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
        mtr: 0.86
        ruby20: 2.0.0.645,1
The process will require 36 MiB more space.
51 KiB to be downloaded.
Proceed with this action? [y/N]: y
Fetching mtr-0.86.txz: 100%   51 KiB  52.4kB/s    00:01
Checking integrity... done (0 conflicting)
[1/2] Installing mtr-0.86...
[1/2] Extracting mtr-0.86: 100%
[2/2] Installing ruby20-2.0.0.645,1...
[2/2] Extracting ruby20-2.0.0.645,1: 100%
Message for ruby20-2.0.0.645,1:
====
Some of the standard commands are provided as separate ports for ease
of upgrading:
        devel/ruby-gems:        gem - RubyGems package manager
        devel/rubygem-rake:     rake - Ruby Make
And some of the standard libraries are provided as separate ports
since they require extra dependencies:
        databases/ruby-gdbm:    GDBM module
Install them as occasion demands.
====
[root@c1100-1][pts/2][zsh/2][Fri 07/31/2015 11:44:50 CDT][0?0&]
~ # pkg autoremove
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages:
Installed packages to be REMOVED:
        ruby20-2.0.0.645,1
The operation will free 35 MiB.
Proceed with deinstalling packages? [y/N]:

@bdrewery
Copy link
Member

1.7.2 still a problem:

# pkg autoremove
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 20 packages:
Installed packages to be REMOVED:
        amd64-binutils-2.25.1_1,1
        libglesv2-11.1.2
        libepoxy-1.3.1
        xorg-server-1.17.4,1
        dri-11.1.2,2
        libXfont-1.5.1,2
        fontsproto-2.1.3,1
        gettext-tools-0.19.7
        libxkbui-1.0.2_4
        libxkbfile-1.0.9
        xkbcomp-1.3.1
        libXaw-1.0.13,2
        libXp-1.0.3,1
        libXxf86misc-1.0.3_3
        xkeyboard-config-2.17
        ruby20-2.0.0.648,1
        ruby21-2.1.8,1
        printproto-1.0.5
        ruby21-bdb-0.6.6_4
        xf86miscproto-0.9.3
The operation will free 136 MiB.
Proceed with deinstalling packages? [y/N]: y
[1/20] Deinstalling xorg-server-1.17.4,1...
[1/20] Deleting files for xorg-server-1.17.4,1: 100%
[2/20] Deinstalling libXaw-1.0.13,2...
[2/20] Deleting files for libXaw-1.0.13,2: 100%
[3/20] Deinstalling libepoxy-1.3.1...
[3/20] Deleting files for libepoxy-1.3.1: 100%
[4/20] Deinstalling dri-11.1.2,2...
[4/20] Deleting files for dri-11.1.2,2: 100%
[5/20] Deinstalling libXfont-1.5.1,2...
[5/20] Deleting files for libXfont-1.5.1,2: 100%
[6/20] Deinstalling libxkbui-1.0.2_4...
[6/20] Deleting files for libxkbui-1.0.2_4: 100%
[7/20] Deinstalling xkbcomp-1.3.1...
[7/20] Deleting files for xkbcomp-1.3.1: 100%
[8/20] Deinstalling libXp-1.0.3,1...
[8/20] Deleting files for libXp-1.0.3,1: 100%
[9/20] Deinstalling libXxf86misc-1.0.3_3...
[9/20] Deleting files for libXxf86misc-1.0.3_3: 100%
[10/20] Deinstalling amd64-binutils-2.25.1_1,1...
[10/20] Deleting files for amd64-binutils-2.25.1_1,1: 100%
[11/20] Deinstalling libglesv2-11.1.2...
[11/20] Deleting files for libglesv2-11.1.2: 100%
[12/20] Deinstalling fontsproto-2.1.3,1...
[12/20] Deleting files for fontsproto-2.1.3,1: 100%
[13/20] Deinstalling gettext-tools-0.19.7...
[13/20] Deleting files for gettext-tools-0.19.7: 100%
[14/20] Deinstalling libxkbfile-1.0.9...
[14/20] Deleting files for libxkbfile-1.0.9: 100%
[15/20] Deinstalling xkeyboard-config-2.17...
[15/20] Deleting files for xkeyboard-config-2.17: 100%
[16/20] Deinstalling ruby20-2.0.0.648,1...
[16/20] Deleting files for ruby20-2.0.0.648,1: 100%
[17/20] Deinstalling ruby21-2.1.8,1...
[17/20] Deleting files for ruby21-2.1.8,1: 100%
[18/20] Deinstalling printproto-1.0.5...
[18/20] Deleting files for printproto-1.0.5: 100%
[19/20] Deinstalling ruby21-bdb-0.6.6_4...
[19/20] Deleting files for ruby21-bdb-0.6.6_4: 100%
[20/20] Deinstalling xf86miscproto-0.9.3...
[20/20] Deleting files for xf86miscproto-0.9.3: 100%
# pkg check -d
Checking all packages: 100%
ruby20-bdb is missing a required shared library: libruby20.so.20

@bapt
Copy link
Member

bapt commented May 19, 2016

Can you try to the latest pkg-devel?

@bdrewery
Copy link
Member

@bapt
Copy link
Member

bapt commented Jul 1, 2024

they are tracked now

@bapt bapt closed this as completed Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants