make index

Kent Stewart kstewart at
Tue Jan 24 14:28:51 PST 2006

On Tuesday 24 January 2006 11:19, Matthew Seaman wrote:
> Michael P. Soulier wrote:
> > After running CVSup, I've seen people build their "index" via
> >
> > cd /usr/ports
> > make index
> > # wait a frickin' long time
> >
> > What is the index, and does it really require rebuilding after each
> > CVSup?
> The index is a list of all of the ports, what each port depends on,
> who the maintainer is and various other data.  It's used by the 'make
> search' command (see ports(7)) an a few other make targets you can
> invoke from /usr/ports, plus it's used quite extensively by
> portupgrade(8).  Other port maintenance software does not need an
> index file -- generally they work out the dependency relations
> between different packages on the fly.
> You don't need to keep running 'make index' all the time.  Firstly,
> you can download a freshly build index by 'make fetchindex' -- which
> is sufficient for most uses. If you use the new portsnap(1) facility
> instead of cvsup(1), you'll get a freshly built index file included
> automatically.  Or (blowing my own trumpet here...) you can install
> sysutils/p5-FreeBSD-Portindex which gives you a method of
> incrementally updating your index file based on what was modified
> during the previous cvsup session (or however you choose to upgrade
> your ports).

You might wonder what Portindex buys you. You have to appreciate that 
you can cvsup, create an HTML listing to the cvsweb cgi facility using 
a log of the cvsup session, create a new INDEX, and an INDEX.db 
relatively quickly. The process is all automated via a shell script.

A typical time for the entire sequence of processing steps using a local 
cvsup mirror is 2 minutes. I had an occasion to time the script because 
of a recent question on the es.freebsd list. I think that 2 minutes is 
as fast as it will run on my systems and do something.

The network is 1000baseT but that doesn't make cvsup run any faster than 
a 100baseT connection. The port people have been playing with some of 
the make features and that adds 5-10 minutes or so because the cache 
entries needs to be updated for all of the ports that use the make file 
that was modified. Occasionally you have to update the entire cache and 
that process is slower than a make index.


Kent Stewart
Richland, WA "I am Andean project".

More information about the freebsd-questions mailing list