From owner-freebsd-questions Mon Dec 9 18:11:10 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5051537B401 for ; Mon, 9 Dec 2002 18:11:07 -0800 (PST) Received: from sccrmhc01.attbi.com (sccrmhc01.attbi.com [204.127.202.61]) by mx1.FreeBSD.org (Postfix) with ESMTP id 618E443F7C for ; Mon, 9 Dec 2002 18:11:05 -0800 (PST) (envelope-from freebsd-questions-local@be-well.no-ip.com) Received: from be-well.ilk.org (lowellg.ne.client2.attbi.com[24.147.188.198]) by sccrmhc01.attbi.com (sccrmhc01) with ESMTP id <2002121002110400100q3582e>; Tue, 10 Dec 2002 02:11:04 +0000 Received: from be-well.ilk.org (lowellg.ne.client2.attbi.com [24.147.188.198] (may be forged)) by be-well.ilk.org (8.12.6/8.12.6) with ESMTP id gBA2B47v039897; Mon, 9 Dec 2002 21:11:04 -0500 (EST) (envelope-from freebsd-questions-local@be-well.no-ip.com) Received: (from lowell@localhost) by be-well.ilk.org (8.12.6/8.12.6/Submit) id gBA2B39u039894; Mon, 9 Dec 2002 21:11:03 -0500 (EST) X-Authentication-Warning: be-well.ilk.org: lowell set sender to freebsd-questions-local@be-well.ilk.org using -f To: John Bleichert Cc: freebsd-questions@FreeBSD.ORG Subject: Re: INDEX file layout References: From: Lowell Gilbert Date: 09 Dec 2002 21:11:03 -0500 In-Reply-To: Message-ID: <44n0ne8vyg.fsf@be-well.ilk.org> Lines: 93 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG John Bleichert writes: > On Mon, 9 Dec 2002, John Bleichert wrote: > > > Date: Mon, 9 Dec 2002 12:20:26 -0500 (EST) > > From: John Bleichert > > To: freebsd-questions@FreeBSD.ORG > > Subject: INDEX file layout > > > > Hello All > > > > Where is the layout for the /usr/ports/INDEX file documented? Looks like a > > bunch of '|'-delimited fields and I'd like to know for sure what each > > field is. From /usr/ports/bsd.port.mk: # This target generates an index entry suitable for aggregation into # a large index. Format is: # # distribution-name|port-path|installation-prefix|comment| \ # description-file|maintainer|categories|build deps|run deps|www site .if !target(describe) describe: @${ECHO_CMD} "`perl -e ' \ print q{${PKGNAME}|${.CURDIR}|${PREFIX}|}; \ if (open(COMMENT, q{${COMMENT}})) { \ $$_ = ; \ chomp; \ print; \ } elsif (not // =~ q{${PORTCOMMENT}}) { \ print q{${PORTCOMMENT}}; \ } else { \ print q{** No Description}; \ } \ if ( -f q{${DESCR}} ) { \ print q{|${DESCR}}; \ } else { \ print q{|/dev/null}; \ } \ print q{|${MAINTAINER}|${CATEGORIES}|}; \ @bdirs = map((split /:/)[1], split(q{ }, q{${FETCH_DEPENDS} ${BUILD_DEPENDS}})); \ @rdirs = map((split /:/)[1], split(q{ }, q{${RUN_DEPENDS}})); \ @mdirs = ( \ map((split /:/)[0], split(q{ }, q{${DEPENDS}})), \ map((split /:/)[1], split(q{ }, q{${LIB_DEPENDS}})) \ ); \ for my $$i (\@bdirs, \@rdirs, \@mdirs) { \ my @dirs = @$$i; \ @$$i = (); \ for (@dirs) { \ if (-d $$_) { \ push @$$i, $$_; \ } else { \ print STDERR qq{${PKGNAME}: \"$$_\" non-existent -- dependency list incomplete\n}; \ } \ } \ } \ for (@bdirs, @mdirs) { \ $$x{$$_} = 1; \ } \ print join(q{ }, sort keys %x), q{|}; \ for (@rdirs, @mdirs) { \ $$y{$$_} = 1; \ } \ print join(q{ }, sort keys %y), q{|}; \ if (open(DESCR, q{${DESCR}})) { \ while () { \ if (/^WWW:\s+(\S+)/) { \ print $$1; \ last; \ } \ } \ } \ print qq{\n};'`" .endif > > Also, I've noticed that some boxes have a /var/db/pkgdb.db file, and some > > do not - where does this file come from? Is it generated by the > > portupgrade tools? > > > > Never mind about this second question, I was looking in the wrong place > (it's in /var/db/pkg), but my first question still stands. > > # John Bleichert > # http://vonbek.dhs.org/latest.jpg > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message