dependency inheritance

Matthew Seaman m.seaman at
Mon May 15 08:10:34 UTC 2006

[LoN]Kamikaze wrote:
> I just created a port for , the
> only dependency is
> RUN_DEPENDS=            portupgrade:${PORTSDIR}/sysutils/portupgrade
> Pkg_info shows the following for portupgrade:
> # pkg_info -r 'portupgrade*'
> Information for portupgrade-2.0.1_1,1:
> Depends on:
> Dependency: db4-4.0.14_1,1
> Dependency: ruby-1.8.4_6,1
> Dependency: perl-5.8.8
> Dependency: ruby18-bdb4-0.5.7
> The dependencies for bsdadminscripts are wrong, though:
> # pkg_info -r bsdadminscripts-1.0
> Information for bsdadminscripts-1.0:
> Depends on:
> Dependency: ruby18-bdb1-0.2.2
> Dependency: openssl-0.9.8b
> Dependency: ruby-1.8.4_6,1
> Dependency: perl-5.8.8
> Dependency: portupgrade-2.0.1_1,1
> First of all I don't understand why it should have any dependencies
> apart from portupgrade.

The port Makefile specifies what other ports it needs at the various phases of
fetch, extract, build, run, libs.  However all of those dependencies can have their
own dependencies etc. etc.  and in the ports INDEX plus in the generated packages
the whole dependency tree is enumerated. One slight wrinkle is that the full eg.
build dependency tree for a port consists of everything listed as BUILD_DEPENDS
plus (cumulatively) all of the *run + lib* depends for those.

> The second problem is that apart from ruby-1.8.4_6,1 and perl-5.8.8,
> which were obviously inherited from portupgrade, why does it inherit the
> wrong version of ruby-bdb and why doesn't it inherit bdb4?

The dependency information produced by pkg_info is derived from the +CONTENTS
and the +REQUIRED_BY files in the pkg directory (/var/db/pkg/whatever).  Some of
that -- mostly the stuff in +CONTENTS -- comes out of the package tarball or the
port installation process, other parts of it come out of tools like portupgrade.

Now, all of that information would be self-consistent if you installed all of the
ports on a machine in one session using either a set of packages from the servers
or a single copy of the ports tree.  As soon as you start updating ports and/or
mixing and matching ports and packages, the information will probably start to get
out of synch. portupgrade and other tools will try and update the data for you, but
just installing updates from the ports tree using make won't.  On the whole though,
having that information not precisely in synch with reality makes no real functional
difference to the server.

It's an important feature of the ports system that it's tests for fulfilling
dependencies assume nothing about the state of bookkeeping in your pkg database,
but rather refer to the installed files and shlibs on the system where you build
the port. 



Dr Matthew J Seaman MA, D.Phil.                       Flat 3
                                                      7 Priory Courtyard
PGP:         Ramsgate
                                                      Kent, CT11 9PW, UK

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 250 bytes
Desc: OpenPGP digital signature
Url :

More information about the freebsd-ports mailing list