From owner-freebsd-ports Tue Sep 7 23: 8:46 1999 Delivered-To: freebsd-ports@freebsd.org Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (Postfix) with ESMTP id 105D315BC6 for ; Tue, 7 Sep 1999 23:08:37 -0700 (PDT) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.9.3/8.9.1) with ESMTP id XAA04078; Tue, 7 Sep 1999 23:06:59 -0700 (PDT) (envelope-from jdp@polstra.com) Received: (from jdp@localhost) by vashon.polstra.com (8.9.3/8.9.1) id XAA10530; Tue, 7 Sep 1999 23:06:59 -0700 (PDT) (envelope-from jdp@polstra.com) Message-ID: X-Mailer: XFMail 1.3 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <199909050240.TAA23475@windsor.research.att.com> Date: Tue, 07 Sep 1999 23:06:58 -0700 (PDT) Organization: Polstra & Co., Inc. From: John Polstra To: Bill Fenner Subject: Re: Handling distfiles in multiple subdirs on master site: how? Cc: ports@freebsd.org Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Bill Fenner wrote: > > The canonical way to do this is kind of ugly: > > MASTER_SITES= http://m3.polymtl.ca/m3htbin/download/m3/pkg/pm3-1.1.13/ \ > http://m3.polymtl.ca/m3htbin/download/m3/pkg/pm3-1.1.13/libs \ > http://m3.polymtl.ca/m3htbin/download/m3/pkg/pm3-1.1.13/graphics/gr-libs > DISTFILES= set.tgz m3config.tgz ui > > especially since it causes a bunch of errors to occur before actually > fetching the right files. Right, I don't like it because of its n**2 problem with too many combinations of master site / distfile that aren't right. If the fetch step can just be made to preserve the directory structure of the DISTFILES entries, then everything will work fine. I made a shell script that does that, and pointed FETCH_CMD at it. Once I did that, everything fetched and built OK. Here's the script. It uses the fact that all of my MASTER_SITES end in "pm3-1.1.13" to figure out where the master site portion ends and the distfile portion begins. But that wouldn't be needed if this functionality were supported in directly. #! /bin/sh PATH=/bin:/usr/bin:/sbin:/usr/sbin export PATH url=$1 path=${url##*/pm3-1.1.13/} dir=${path%/*} minusA= if [ `sysctl -n kern.osreldate` -ge 300000 ]; then minusA="-A" fi mkdir -p ${dir} || exit exec fetch $minusA -o ${path} ${url} John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "No matter how cynical I get, I just can't keep up." -- Nora Ephron To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message