Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Oct 2003 19:21:33 +0200
From:      Erik Trulsson <ertr1013@student.uu.se>
To:        Lowell Gilbert <freebsd-questions-local@be-well.ilk.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Why build INDEX ?
Message-ID:  <20031019172132.GA47552@falcon.midgard.homeip.net>
In-Reply-To: <44k77148ug.fsf@be-well.ilk.org>
References:  <20031017183307.401450af.adam.mclaurin@gmx.net> <44smlqqwil.fsf@be-well.ilk.org> <20031018192934.2c3ed3fa.adam.mclaurin@gmx.net> <44k77148ug.fsf@be-well.ilk.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Oct 19, 2003 at 10:09:59AM -0400, Lowell Gilbert wrote:
> Adam McLaurin <adam.mclaurin@gmx.net> writes:
> 
> > On 18 Oct 2003 13:35:30 -0400
> > Lowell Gilbert <freebsd-questions-local@be-well.ilk.org> wrote:
> > 
> > > 'pkg_version -v' and 'make search' are very useful, and depend on an
> > > up-to-date INDEX file.
> > 
> > 'pkg_version -v' does NOT depend on an up-to-date INDEX. 
> > 
> > 
> > > This is completely incorrect.  Building INDEX.db is for portversion.
> > > INDEX has to be updated for pkg_version to see the updated versions of
> > > the ports skeletons (in other words, if you don't rebuild it,
> > > 'pkg_version -v won't know that your ports have been updated).
> > 
> > Again, 'pkg_version -v' works just fine without an updated INDEX. I've done it
> > hundreds of times; it always works.
> 
> Sure it works, for some definition of "works" that doesn't involve
> using up-to-date information.  It will tell you if your ports are
> outdated, but it will compare them to the versions that were present
> when the INDEX file was built, not the ones that are currently
> installed.  So if you cvsup your ports and want to know if you just
> downloaded any new versions of installed ports, you have to have an
> updated INDEX file.  

Wrong.
'pkg_version -v' compares the version that has been installed to the
version of the port in the ports tree.
Only if that port does not exist in the ports tree (for example because
it has been moved from one category to another, or has been deleted) is
INDEX consulted.
An up-to-date INDEX is *not* needed.

(Things used to work as you describe, but that was changed a long time
ago.)

> 
> That doesn't mean you have to rebuild your own INDEX file, because you
> can (and will, unless you specifically refuse it) download it along
> with the rest of the ports collection.  Of course, those are only
> built every few weeks, so they generally won't be completely
> up-to-date either.

There is almost never any need to rebuild INDEX.
I think sysinstall might use it to get information on available
packages, but I am not sure.  Other than that it is not really needed.


-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013@student.uu.se



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