FreeBSD binary package upgrades

From WTFwiki
Revision as of 04:11, 9 April 2009 by Jontow (talk | contribs) (another note about PKG_SITES)
Jump to navigation Jump to search

Say you're doing something strange.. like updating from 6.4-RELEASE to 6.4-RELEASE-p3.. maybe you're even
using freebsd-update(8).. awkward, eh?

Well, say you want to also update your ports, but you just got away without rebuilding kernel/userland and
would like to do the same for ports.. not possible you say? -- neat trick follows:

 # export PKG_SITES="ftp://ftp.freebsd.org//pub/FreeBSD/ports/i386/packages-6-stable/Latest/"
 # portupgrade -arRP

 (Now its time to listen to some music or have breakfast..)


This will, in theory, fetch any binary packages it can from $PACKAGESITE (adjust to your needs), while also
opting to build them from ports (so make sure you update it.. via portsnap(8)?) if a binary copy can't be
located.

Failing the above; I had some success editing '/usr/local/etc/pkgtools.conf' and adding the following to the
'PKG_SITES' array:

 sprintf('ftp://ftp.freebsd.org//pub/FreeBSD/ports/i386/packages-%s-stable/', OS_MAJOR),


Don't ask why it needs two '/'s, it isn't obvious to me, either.

Good luck, this seems somehow not very well documented.

Jontow 03:12, 9 April 2009 (EDT)