Skip site navigation (1)Skip section navigation (2)
Date:      09 Dec 2002 21:11:03 -0500
From:      Lowell Gilbert <freebsd-questions-local@be-well.no-ip.com>
To:        John Bleichert <syborg@stny.rr.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: INDEX file layout
Message-ID:  <44n0ne8vyg.fsf@be-well.ilk.org>
In-Reply-To: <Pine.LNX.4.44.0212091310110.8569-100000@janeway.vonbek.dhs.org>
References:  <Pine.LNX.4.44.0212091310110.8569-100000@janeway.vonbek.dhs.org>

next in thread | previous in thread | raw e-mail | index | archive | help
John Bleichert <syborg@stny.rr.com> writes:

> On Mon, 9 Dec 2002, John Bleichert wrote:
> 
> > Date: Mon, 9 Dec 2002 12:20:26 -0500 (EST)
> > From: John Bleichert <syborg@stny.rr.com>
> > 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}})) { \
                $$_ = <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 (<DESCR>) { \
                    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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44n0ne8vyg.fsf>