Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Sep 2006 23:58:46 -0700
From:      Colin Percival <cperciva@freebsd.org>
To:        ke han <ke.han@redstarling.com>, freebsd-questions@freebsd.org
Subject:   Re: portsdb -Uu
Message-ID:  <450A4F26.3020702@freebsd.org>
In-Reply-To: <E46B989E-8387-4F9B-80CA-94D6872FE93E@redstarling.com>
References:  <E46B989E-8387-4F9B-80CA-94D6872FE93E@redstarling.com>

next in thread | previous in thread | raw e-mail | index | archive | help
ke han wrote:
> I am using
> portsnap fetch
> portsnap update
> 
> to sync my ports tree on FreeBSd 6.1...it seems it maintains an index
> when I run update.

Yes.

> I am used to using:
> portsversion and portsupdate to upgrade ports...in this method I have
> also used
> portsdb -Uu
> to rebuild an index anytime prior to running these commands...yes
> portsdb takes a while and I've always wondered if this is necessary
> prior to running any of these commands..

portsdb -Uu does two things:
1. It rebuilds the ports INDEX.  This is done by "portsdb -U" and takes a long time.
2. It rebuilds the ports INDEX.db database.  This is done by "portsdb -u", takes
only a few seconds, and is done automatically when you run portupgrade if the
database is out of date.

> So my question is:  Is the index being maintained by portsnap the same
> or a replacement to that used by portupgrade?  Do I have to maintain
> both sets of indexes in order to use portsupdate??

The ports INDEX file generated by "portsdb -U" is the same file as portsnap
generates.  Since the INDEX.db database is generated automatically, this means
there is no need to run portsdb between running portsnap and running portupgrade.

My standard ports update/upgrade procedure is:
portsnap fetch
portsnap update
pkg_version -vIL=	# this is equivalent to "portversion -vL="
portupgrade -a

Colin Percival



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?450A4F26.3020702>