From owner-freebsd-ports@FreeBSD.ORG Wed Jan 2 11:29:54 2008 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D89B16A46C; Wed, 2 Jan 2008 11:29:54 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 41C4713C45D; Wed, 2 Jan 2008 11:29:53 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <477B75B0.5010705@FreeBSD.org> Date: Wed, 02 Jan 2008 12:29:52 +0100 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: Jeremy Chadwick References: <477B0EA4.1040401@highperformance.net> <20080102051908.GA8486@eos.sc1.parodius.com> In-Reply-To: <20080102051908.GA8486@eos.sc1.parodius.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "Jason C. Wells" , freebsd-ports@freebsd.org Subject: Re: Port Version via pkg_add X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 11:29:54 -0000 Jeremy Chadwick wrote: > On Tue, Jan 01, 2008 at 08:10:12PM -0800, Jason C. Wells wrote: >> How does pkg_add determine what version of a port to add when >> 'pkg_add -Kr' is used? > > pkg_add calls getosreldate(3) to obtain the integer value of the release > of FreeBSD running on the machine. > > The list of paths to fetch from are hard-coded based on range > comparisons for the above reldate value. See > src/usr.sbin/pkg_install/add/main.c for a list. > >> How can I make pkg_add use 6.3 packages instead of 6.2? > > You run pkg_add with a URL that contains "packages-6.3-release" instead > of packages-6.2-release, e.g.: > > pkg_add -r ftp://ftp4.freebsd.org/pub/FreeBSD/ports/i386/packages-6.3-release/Latest/whatever.tbz > Or just set one of the various env variables that controls fetch location, see the manpage. Kris