Install and keep your FreeBSD ports updated with portmaster

If you're still installing packages on FreeBSD manually by running make install clean directly in the ports tree, and find it tedious having to wait and answer different dialog screens when installing huge package sets like Gnome and OpenOffice you should really take a look at portmaster.
Portmaster is a shell script written by Doug Barton which will make your port management far more pleasent. Since it's made for FreeBSD you will find it in ports (/usr/ports/ports-mgmt/portmaster).

To install a port (I assume you have sudo installed):

sudo portmaster -D x11/gnome2

The -D tells portmaster to delete them files in /usr/ports/distfiles when it is finished with them.

Portmaster will now traverse through all the dependencies that the port depends on, and let you configure all of them before it starts any compiling. By doing do, the installation will, in most cases, be able to do the whole compile process and install everything unattended. Thats nice because you can just detach the whole thing in a screen and, in the meanwhile, focus on something else.

At first, I only started using portmaster for keeping my installed ports up to date. To upgrade a port, ImageMagick for instance, with all its new, required, dependencies after you updated your ports-tree, you execute this:

sudo portmaster ImageMagick-nox11

If you want to upgrade all your ports, simply execute:

sudo portmaster -a

Portmaster will automaticly take a backup of all the existing ports that will be upgraded. Often, in non-production environments (your desktop), you can add the -B option to prevent it from doing so to make it go a little faster.

sudo portmaster -DBa

or

sudo portmaster -DB ImageMagick-nox11


To get a list of all the installed ports and show wether they are depended on or have dependencies:

portmaster -L


This article is not finished.

Last tweets

Loading...
Follow tagestad on Twitter