Date: Mon, 20 Oct 2003 11:57:35 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Kent Stewart <kstewart@owt.com>, Lowell Gilbert <freebsd-questions-local@be-well.no-ip.com>, freebsd-questions@freebsd.org Subject: Re: Why build INDEX ? Message-ID: <20031020105735.GA17788@happy-idiot-talk.infracaninophile.co.uk> In-Reply-To: <20031020091604.GA21577@falcon.midgard.homeip.net> References: <20031017183307.401450af.adam.mclaurin@gmx.net> <44k77148ug.fsf@be-well.ilk.org> <20031019172132.GA47552@falcon.midgard.homeip.net> <200310191242.13604.kstewart@owt.com> <20031019214918.GA57122@falcon.midgard.homeip.net> <20031020073937.GA15500@happy-idiot-talk.infracaninophile.co.uk> <20031020091604.GA21577@falcon.midgard.homeip.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--yrj/dFKFPuw6o+aM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 20, 2003 at 11:16:04AM +0200, Erik Trulsson wrote: > On Mon, Oct 20, 2003 at 08:39:37AM +0100, Matthew Seaman wrote: > > That's not entirely true. pkg_version(1) won't work without an INDEX > > file. > Yes, it will. pkg_version will first check against the version of the > port in the ports tree. Only if that is not available is INDEX > consulted. Read the manpage for pkg_version(1) if you don't believe > me. You are entirely correct, except in the niggling pedantic sense that the script will always try and read some sort of INDEX file into itself. Since the return value of the open() on the INDEX file is never checked, it seems that you can just manage without. pkg_version(1) always checks against the ports tree first, and then reads the INDEX file to fill in any gaps. That information was cunningly hidden in the man page right above the paragraph I read, and similarly in the script itself. While you do have to provide an INDEX file to keep it placated, I guess you could just use an empty file. You lose out occasionally for ports that get deleted or renamed so that the package origin no londer exists, but that's pretty uncommon. About the only thing that /usr/ports/INDEX gets you which you can't easily get by other means is the ability to do the package updates in the correct order. However there isn't an application in the base system that can make use of that information. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --yrj/dFKFPuw6o+aM Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/k7+fdtESqEQa7a0RAnnqAJ90gO8OT8Z7aUd1//DY/gHV7n8Z+gCgkwzR +fe9poIvU4IEZZ/xxtmWolw= =hhCk -----END PGP SIGNATURE----- --yrj/dFKFPuw6o+aM--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031020105735.GA17788>