PACKAGESITE Directory Structure

Mel Flynn mel.flynn+fbsd.questions at mailing.thruhere.net
Sat Jun 20 20:27:48 UTC 2009


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


More information about the freebsd-questions mailing list