diff options
author | sobomax <sobomax@FreeBSD.org> | 2002-01-13 12:05:07 +0000 |
---|---|---|
committer | sobomax <sobomax@FreeBSD.org> | 2002-01-13 12:05:07 +0000 |
commit | 5003182a35f232069e4997b3fee70ff7bbc2e4a7 (patch) | |
tree | 064e844a217ad95a62263cb25a073ede3781963b /Mk/bsd.gnome.mk | |
parent | bdeb348dd4cbbced5a0e721515b7d14999e58765 (diff) | |
download | FreeBSD-ports-5003182a35f232069e4997b3fee70ff7bbc2e4a7.zip FreeBSD-ports-5003182a35f232069e4997b3fee70ff7bbc2e4a7.tar.gz |
Add chkdepschain.py - a tool to address one of the most annoying when it comes
down to user support flaws in the FreeBSD ports system. The flaw in question
is related to the fact that dependencies are often "chained", which allows to
simplify maintenance of ports with large number of implied dependencies (a la
Evolution, Nautilus, you-name-it). Dependency chaining it's not a problem by
itself, but the fact that when building or installing a port the system doesn't
check chain integrity - it's only checks that dependencies explicitly
specified in port's Makefile are satisfied, which opens wide window for
various hard-trackable problems when one or more links in the middle of the
chain missed.
The idea behind the tool is quite simple - it should be executed right after
main dependency checking procedure, two times for each build - check build-time
chain before building the port (pre-pre-extract) and check run-time chain
before installing the port (pre-pre-install). When executed, the tool checks
integrity of the specified chain (build-time, run-time or both) and reports all
errors, both fatal (dependency isn't installed) and non-fatal (dependency is
installed, but different version).
I've wrote this tool mostly to simplify maintenance of the GNOME ports, but
it doesn't contain anything GNOME-specific, so that it could be used in the
other parts of tree as well.
As an example I've added GNOME_VALIDATE_DEPS_CHAIN knob into bsd.gnome.mk (off
by default), which enables automatic chain validation for all ports that
USE_GNOMELIBS. This is a bit hackish, because I've used pre-extract and
pre-install targets - what we probably need is a generic way to plug various
custom tasks specified in bsd.xxx.mk (where xxx is kde, gnome, python, etc.)
into various parts of the build process (something like {pre,post}-pre-foo,
{pre,post}-post-foo springs into my mind).
The code is quite raw, so that I would appreciate any bug reports, patches,
suggestions, constructive critiquie and so on.
Diffstat (limited to 'Mk/bsd.gnome.mk')
-rw-r--r-- | Mk/bsd.gnome.mk | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Mk/bsd.gnome.mk b/Mk/bsd.gnome.mk index bdd4762..336ebc2 100644 --- a/Mk/bsd.gnome.mk +++ b/Mk/bsd.gnome.mk @@ -308,5 +308,26 @@ LIB_DEPENDS+= panel_applet.5:${PORTSDIR}/x11/gnomecore PLIST_SUB+= GNOME:="@comment " NOGNOME:="" DATADIR="share" .endif +# Start of GNOME_VALIDATE_DEPS_CHAIN part. +.if defined(USE_GNOMELIBS) && defined(GNOME_VALIDATE_DEPS_CHAIN) +BUILD_DEPENDS+= python:${PORTSDIR}/lang/python +CHKDPCHN_CMD?= ${PORTSDIR}/Tools/scripts/chkdepschain.py +CHKDPCHN_CACHE= .chkdpchn.cache.${PKGNAME} + +.if !target(pre-extract) +pre-extract:: + @${ECHO_MSG} "===> Validating build-time dependency chain for ${PKGNAME}" + @${MKDIR} ${WRKDIR} + @${CHKDPCHN_CMD} -b -s ${WRKDIR}/${CHKDPCHN_CACHE} +.endif + +.if !target(pre-install) +pre-install:: + @${ECHO_MSG} "===> Validating run-time dependency chain for ${PKGNAME}" + @${CHKDPCHN_CMD} -r -L ${WRKDIR}/${CHKDPCHN_CACHE} +.endif +.endif +# End of GNOME_VALIDATE_DEPS_CHAIN part. + .endif # End of use part. |