I am clearly missing the basics here...

I just did:

portsnap fetch extract

followed by

portsnap fetch upgrade

followed by

portsnap upgrade

all of which I thought would fetch the latest available ports and install them.

I then did pkg_version -vL=

and found hundreds of messages in this format:

Code:
portname-"version"              <      needs updating (port has "later version")
What is the correct step by step procedure to download the latest ports and install them so that my entire system is up to date? (FreeBSD 8.0 btw).
 
The "ports collection" is a directory of files that are build instructions. By using portsnap, you've updated that directory, so it shows the most recent build instructions for ports.

Now you can use a tool like portupgrade or portmaster to update your installed applications.
 
To upgrade my ports I use ports-mgmt/portsnap and ports-mgmt/portmaster. First I download the updated ports, which you've figured out already:

# portsnap fetch update

And then I usually see what ports that can be upgraded:

[CMD=]pkg_version -I -l '<'[/CMD]

And then I peek into /usr/ports/UPDATING to see if I need to take any special steps. I recommend you don't skip this step--I used to until one day half my ports broke.

Finally, I build and install the ports with portmaster:

# portmaster -aDB

The options mean:

-a check all ports, update as necessary
-B prevents creation of the backup package for the installed port
-D no cleaning of distfiles
 
You *really* don't want to run with -B, and should be using -b (create a backup package of the currently installed version). Why? Because if something screws up, you can always [cmd=]pkg_delete -xi appname; pkg_add /path/to/backupdir/appname.tbz[/cmd] and continue on with the old version.

This has proved so useful in the past, that I now set it in portmasterrc on all my systems.

It's especially useful when the new version doesn't work (like kdenlive 0.7.7 for awhile) and you want to revert to the old, known to work, version.
 
Back
Top