From owner-freebsd-ports Wed Mar 31 2: 7:46 1999 Delivered-To: freebsd-ports@freebsd.org Received: from firewall1.lehman.com (firewall1.Lehman.COM [192.147.65.82]) by hub.freebsd.org (Postfix) with ESMTP id 7835115542 for ; Wed, 31 Mar 1999 02:07:44 -0800 (PST) (envelope-from nclayton@lehman.com) Received: from relay.messaging-svcs2.lehman.com by firewall1.lehman.com (8.8.6/8.8.6) id FAA03417; Wed, 31 Mar 1999 05:07:24 -0500 (EST) Received: from lonmailhost.lehman.com by relay.messaging-svcs2.lehman.com (8.9.3/8.8.5) id FAA23452; Wed, 31 Mar 1999 05:06:51 -0500 (EST) Received: by lonmailhost.lehman.com (SMI-8.6/Lehman Bros. V1.5) id LAA08608; Wed, 31 Mar 1999 11:06:48 +0100 Message-ID: <19990331110648.G14492@lehman.com> Date: Wed, 31 Mar 1999 11:06:48 +0100 From: nclayton@lehman.com To: ports@freebsd.org Subject: Explicit version checks in dependencies Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i Organization: Lehman Brothers Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi porters, [ Please cc: replies to me, I'm not on the list ] I maintain the textproc/docproj port. This is a meta-port to include all the programs required by the FreeBSD documentation project (similar to the KDE port). At the moment I use normal dependencies to verify that various executables and other files have been installed. This works (after a fashion) but has problems. For example, there are several versions of TeX that the user could have installed prior to installing this port. Only one of them (teTeX-beta) will work, but it's very difficult to tell an installation of teTeX-beta apart from any other install of TeX. Simply checking for a /usr/local/bin/tex executable isn't sufficient. Or the textproc/dsssl-docbook-modular port, which installs files in to /usr/local/share/sgml/docbook/dsssl/modular/*. Different versions of this port are very similar, so simply checking for the existance of a file isn't enough. Ideally, I'd like to be able to check for whether a port's been installed, and the version number that was installed as well. I think I can do this by specifying dependencies on directories in /var/db/pkg, something like; BUILD_DEPENDS= /var/db/pkg/teTeX-981113/:${PORTSDIR}/print/teTeX-beta\ /var/db/pkg/jade-1.2.1:${PORTSDIR}/textproc/jade\ /var/db/pkg/tidy-99.2.12:${PORTSDIR}/www/tidy and so on. That'll work, but is inflexible. If Jade is upgraded to version 1.2.2 for example, these dependencies will fail. In an ideal world there'd be a way to specify the minimum version number required, possibly with a warning if a newer version of the port exists. Something like; # cd /usr/ports/textproc/docproj # make dep-check Checking teTeX-981113 (print/teTeX-beta): Found Checking tidy-99.2.12 (www/tidy): Found Checking jade-1.2.1 (textproc/jade): Found 1.2.2 (should be OK) Is this sort of functionality already in the ports system somewhere, and I just haven't seen it? N -- --+==[ Systems Administrator, Year 2000 Test Lab, Lehman Brothers, Inc. ]==+-- --+==[ 1 Broadgate, London, EC2M 7HA 0171-601-0011 x5514 ]==+-- --+==[ Year 2000 Testing: It's about time. . . ]==+-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message