From owner-freebsd-questions@FreeBSD.ORG Sat Jun 20 20:27:48 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF1FB1065672 for ; Sat, 20 Jun 2009 20:27:48 +0000 (UTC) (envelope-from mel.flynn+fbsd.questions@mailing.thruhere.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id 7E0F48FC08 for ; Sat, 20 Jun 2009 20:27:48 +0000 (UTC) (envelope-from mel.flynn+fbsd.questions@mailing.thruhere.net) Received: from smoochies.rachie.is-a-geek.net (mailhub.rachie.is-a-geek.net [192.168.2.11]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id 8CB647E837 for ; Sat, 20 Jun 2009 12:27:47 -0800 (AKDT) From: Mel Flynn To: freebsd-questions@freebsd.org Date: Sat, 20 Jun 2009 12:27:46 -0800 User-Agent: KMail/1.11.4 (FreeBSD/8.0-CURRENT; KDE/4.2.4; i386; ; ) References: <4ad871310906181931l7623d9cj83a8f39fe497a4d3@mail.gmail.com> In-Reply-To: <4ad871310906181931l7623d9cj83a8f39fe497a4d3@mail.gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906201227.46737.mel.flynn+fbsd.questions@mailing.thruhere.net> Subject: Re: PACKAGESITE Directory Structure X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Jun 2009 20:27:48 -0000 On Thursday 18 June 2009 18:31:02 Glen Barber wrote: > Hello, list. > > After trying to figure out the incorrect directory structure for some > of the packages hosted on my site, I am at a loss. > > After reading through /usr/src/usr.sbin/pkg_install/add/main.c from > HEAD, lines 337-340 seems to suggest that if 'Latest' is not found, > 'All' is implied to pkg_add when PACKAGESITE is explicitly defined > (otherwise overridden with hard-coded values). The most intuitive PACKAGESITE is the one pointing to the directory *before* All including trailing slash. This way one can add packages by origin, which is more human friendly then knowing the specific version or what the mangled LATEST_LINK is. pkg_add will then do the right thing with respect to dependencies. But to explain the PACKAGESITE variable: it is expected to point to the final location (including trailing slash) for the command line argument(s) given. pkg_add will try to figure out how to get to 'All/' and 'Latest/' the best it can if the url ${PACKAGESITE}$1 returns not found and for dependencies. -- Mel