From owner-freebsd-questions@FreeBSD.ORG Mon Oct 20 03:58:18 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 373E316A4B3 for ; Mon, 20 Oct 2003 03:58:18 -0700 (PDT) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id B62C943FAF for ; Mon, 20 Oct 2003 03:58:16 -0700 (PDT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [127.0.0.1]) h9KAvcjA018064 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 20 Oct 2003 11:58:10 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id h9KAvZZm018059; Mon, 20 Oct 2003 11:57:35 +0100 (BST) (envelope-from matthew) Date: Mon, 20 Oct 2003 11:57:35 +0100 From: Matthew Seaman To: Kent Stewart , Lowell Gilbert , freebsd-questions@freebsd.org Message-ID: <20031020105735.GA17788@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , Kent Stewart , Lowell Gilbert , freebsd-questions@freebsd.org 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> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yrj/dFKFPuw6o+aM" Content-Disposition: inline In-Reply-To: <20031020091604.GA21577@falcon.midgard.homeip.net> User-Agent: Mutt/1.5.4i X-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.60 X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on happy-idiot-talk.infracaninophile.co.uk Subject: Re: Why build INDEX ? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Oct 2003 10:58:18 -0000 --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--