DEPENDS -- is it time to remove it?

Matthew Seaman m.seaman at infracaninophile.co.uk
Thu Jan 4 06:02:21 PST 2007


Dear all,

The ports make infrastructure has a whole series of variables for showing
how one port depends on another: LIB_DEPENDS, BUILD_DEPENDS, RUN_DEPENDS
etc.  Amongst these is what looks to me like the vestigial remnant of
an earlier phase of the ports: the plain, unmodified 'DEPENDS' variable.

This seems to have an effect apparently like all of the other DEPENDS
variants rolled together, but unlike the others you can't give it a
filename or a shlib to use as a test that whatever it references has
been installed, so it always causes its target to be installed.

The Porter's Handbook says (Section 5.7.10):

   "Do not use DEPENDS unless there is no other way the behaviour you want
    can be accomplished. It will cause the other port to always be built
    (and installed, by default), and the dependency will go into the
    packages as well. If this is really what you need, you should probably
    write it as BUILD_DEPENDS and RUN_DEPENDS instead--at least the
    intention will be clear."

Plus it seems that there is nowadays a grand total of just 3 ports out
of 16,300 or so that actually uses this variable:

happy-idiot-talk:/usr/ports:% grep -re '^DEPENDS\>' .
./audio/klira/Makefile:DEPENDS= ${PORTSDIR}/misc/kdehier            [*]
./www/caudium12/Makefile:DEPENDS=       ${PORTSDIR}/lang/pexts/
./x11/kdelibs3/Makefile:DEPENDS=        ${PORTSDIR}/misc/kdehier

Practically, removing DEPENDS would simplify (slightly) the logic in
bsd.port.mk and make generating the INDEX-n file a bit faster.

	Cheers,

	Matthew

[*] audio/klira is an oddity: all but two other KDE apps inherit their
dependency on kdehier through depending on kdelibs3.  The two other
exceptions, both of which have a RUN_DEPENDS directly on kdehier, are
math/proofgeneral (deprecated, due for removal on 2007-02-07) and
sysutils/kports (which also depends on kdelibs, so doesn't need the
direct dependency as well).

-- 
Dr Matthew J Seaman MA, D.Phil.                       7 Priory Courtyard
                                                      Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey         Ramsgate
                                                      Kent, CT11 9PW

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 250 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20070104/e746e54e/signature.pgp


More information about the freebsd-ports mailing list