View Single Post
  #5   (View Single Post)  
Old 28th September 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

First, I'm not looking over your shoulder, so I can not see what dependenciy references were missing, nor would I know why.

Second, pkg_check(5) repairs inconsistencies in the database of installed packages, to my recollection it does not install missing items for you.

The database resides in /var/db/pkg, as described in package(5). Let's look at gimp:
Code:
$ cd /var/db/pkg/gimp-2.8.18p0/
$ ls -l
total 616
-rw-r--r--  1 root  wheel  284905 Sep 26 22:16 +CONTENTS
-rw-r--r--  1 root  wheel     759 Sep 26 22:16 +DESC
-rw-r--r--  1 root  wheel     762 Sep 26 22:16 +REQUIRING
$
The +CONTENTS file is the package's packing list, and is based on the port packing list in /usr/ports/graphics/gimp/stable/pkg/PLIST.

The +DESC file is a copy of /usr/ports/graphics/gimp/stable/pkg/DESCR.

+REQUIRING is the package run dependency list:
Code:
$ cat ./+REQUIRING
ghostscript-9.07p3
libmng-1.0.10p3
babl-0.1.18
dbus-1.10.10v0
openjpeg-1.5.1p1
ijs-0.35p2
bzip2-1.0.6p8
.
.
.
$
Let's look at one of these dependencies, such as bzip2, which is used everywhere.
Code:
$ cd /var/db/pkg/bzip2-1.0.6p8/
$ ls -l
total 16
-rw-r--r--  1 root  wheel  2237 Sep 26 22:19 +CONTENTS
-rw-r--r--  1 root  wheel   433 Sep 26 22:19 +DESC
-rw-r--r--  1 root  wheel   457 Sep 26 22:19 +REQUIRED_BY
$
The new file is +REQUIRED_BY. These are reverse dependencies. These are tracked to keep me from inadvertently deleting bzip2 while it is still needed. Once these many packages have been deleted, it is safe to delete bzip2 from my system.
Code:
$ cat ./+REQUIRED_BY
yelp-3.20.1p0
totem-pl-parser-3.10.6p2
imlib2-1.4.7p1
ffmpeg-20160903
libarchive-3.2.1
.
.
.
gimp-2.8.18p0
.
.
.
$
------

There are several types of dependencies.

Build dependencies are simply packages needed to build a port, such as compilers and the many build toolchains.

Run dependencies must be installed and remain installed while the package is installed. Simple tools like bzip2 are often both build and run dependencies.

Library dependencies are more complex, as they may be third party, or may be in base or in X11. Library dependencies are considered to be both build and run. See the many references to LIB_DEPENDS and WANTLIB in bsd.port.mk(5) for further details.

Last edited by jggimi; 28th September 2016 at 10:57 AM. Reason: typos
Reply With Quote