The pkgdb variable generated for pbulk.conf is ${PREFIX}/var/db/pkg but
bootstrap generates by default PKG_DBDIR=${PREFIX}/pkgdb.
This fix add a common PKGDBDIR variable used for both pbulk.conf and
bootstrapkit.
changing the permission of ${PACKAGES} at the end of the script prevents that
from working.
Undo the change in r1.4 to create the All directory during setup & instead do
not change permissions.
Tested on OS X Tiger & FreeBSD.
Heads up by joerg
[1] http://mail-index.netbsd.org/pkgsrc-changes/2017/08/01/msg160826.html
at least on NetBSD. Trying to build with /bin/csh as login
shell leads to a rather cryptic "Illegal variable name" error
message for all bulk-built packages.
The script serves several purposes. Chief of them:
1. Fast track for those who just want to build their 1000 packages
and do not want to bother with optimizations.
2. Fast track for those who want to understand how pbulk is supposed
to be set up.
Because it serves as a documentation (providing working setup at the same time),
a lot of features are intentionally left out.