Monday, January 21, 2008

Dealing with ports

Recently I came across of a more "posh", if you will, way to deal with ports. Instead of trusty old cvsup I was recommended to try out portsnap, which cames in FreeBSD base system for a while already - specifically, since 6.0. Older than that, just use ports-mgmt/portsnap port.

It is very easy to use - in fact, I find it easier than cvsupdate.

First, you need to fetch a compressed snapshot of the ports tree.
# portsnap fetch

Next, a live copy of ports tree should be extracted in /usr/ports - the manual mentions you should do this regardless even if there is one created with cvsup.
# portsnap extract

That was for the first time. After that, it's just update
# portsnap fetch update


Next thing I found very handy was http://www.freshports.org/ports-mgmt/portupgrade/. Now unlike the vanilla cd /usr/ports/portdir && make install clean, it can actually update dependencies as well. Nice. Comes with a set of handy utilities - portinstall, pkg_deinstall etc.



No comments: