pkg_add -r and a local package repo

Matthew Seaman m.seaman at
Wed Jan 11 22:52:59 UTC 2012

On 11/01/2012 22:32, Randal L. Schwartz wrote:
>>>>>> "Jason" == Jason Helfman <jhelfman at> writes:
> Jason> Why not just point the PACKAGESITE to the Latest directory of the tree you
> Jason> want to install?
> I am, but it has zsh-4.3.15.tbz and not zsh.tbz, so I have to pkg_add -r
> "zsh-4.3.15", and that's the annoying part.

What's the directory structure like in your PACKAGESITE ?  If it's the
standard layout obtained eg. by creating /usr/ports/packages then the
following sort of structure should be automatically created:

% cd /usr/ports/packages
% find . -type d
./All            <<--------****
./Latest         <<---------****

viz. directories mirroring each port category (created when you build a
package from a port in one of those categories) plus the two indicated
extras. (Well, and the one portmaster uses for its backups.) 'All' just
contains a copy of every package you build.  'Latest' however contains
links to the latest version of each package, like so:

% ls -1 ap*


% ls -l apache22.tbz
lrwxr-xr-x  1 root  wheel  24 Dec 23 17:51 apache22.tbz@ ->

This is what the LATEST_LINK variable mentioned earlier in the thread is
all about.

Point PACKAGESITE at the /usr/ports/packages/Latest  and it should work
as you require.



Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP:     Ramsgate
JID: matthew at               Kent, CT11 9PW

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 267 bytes
Desc: OpenPGP digital signature
Url :

More information about the freebsd-questions mailing list