revdep(1)

NAME
revdep - check for missing libraries of installed packages

SYNOPSIS
revdep [-h] [-v|-vv|-vvv|-vvvv] [package...]

DESCRIPTION
revdep checks for missing libraries needed by the installed packages, using elfutils’ libelf and the same algorithm that ld.so(8) uses.

OPTIONS

-h  Display a help message

-d  Specify an alternate location for the package database

-c  Specify an alternate location for ld.so.conf

-r  Specify an alternate directory for revdep package config

-i  Specify the ports to ignore on this run (comma-separated)

Options controlling the verbosity

-v  Print the steps that revdep is taking, even if it eventually finds no broken ports

-vv Print for each broken port the files that are linked to missing libraries

-vvv
    Print the missing libraries, sorted by the file that requires them

-vvvv
    Show debug/trace

EXAMPLES
Try this command to list broken packages:

    revdep

Use this command to rebuild packages on your system:

    prt-get update -fr $(revdep)

Use this loop to check that all the runtime libraries needed by mpv are actually present. If any are absent, search the footprints to determine which ports provide the missing libraries. (Typical use-case: when sharing binary packages among CRUX installations, the system on which a package was built might have more available libraries than the systems on which the package is later installed, leading to breakage on the latter machines.)

       revdep -vvv mpv \
       | awk -v FS=: '/(missing library)/ {print $3}' \
       | while read -r misslib; do
              prt-get fsearch $misslib;
         done

ADDITIONAL LIBRARY DIRECTORIES
Upon startup, revdep searches /etc/revdep.d/ for files named after ports. If any are found, any directories (assumed to be absolute pathes and delimited by newlines) within the file are added to a list of port specific directories to search if a library dependency is not found in one of the many standard locations (as specified by ld.so(8)).

If a port is discovered to have library dependencies that are in a non-standard location, then a file, as specified above, should be created.

For example, if the port "firefox" has a "libxul.so" dependency in a the non-standard directory "/usr/lib/firefox" then a file named "firefox" should be created under "/etc/revdep.d" with a single line containing "/usr/lib/firefox". This will tell revdep where to find firefox's "libxul.so" when looking for its library dependencies, reducing one source of false positives. Ideally, this file would be included with the port's own packaging as well.

CREDITS
Inspired by the shell script of Johannes Winkelmann <jw@tks6.net>, with C++ design contributions from Danny Rawlins <contact@romster.me>.

AUTHORS
James Buren, braewoods @ LiberaChat

SEE ALSO
ld.so(8), prt-get(8), pkginfo(1)