Posted by: jasonk2600 | April 3, 2009

Keeping FreeBSD Ports Collection Updated


Keeping the ports collection up-to-date on a FreeBSD 7.x system is a very simple process.  The first step is to login as a user with root priveledges and download the latest ports collection snapshot.  NOTE: The portsnap utility used in the example below is included in the base system of every FreeBSD 7.x installation.

# portsnap fetch
Looking up portsnap.FreeBSD.org mirrors... 3 mirrors found.
Fetching snapshot tag from portsnap1.FreeBSD.org... done.
Fetching snapshot metadata... done.
Updating from Wed Aug  6 18:00:22 EDT 2008 to Sat Aug 30 20:24:11 EDT 2008.
Fetching 3 metadata patches.. done.
Applying metadata patches... done.
Fetching 3 metadata files... done.
Fetching 90 patches.....10....20....30....40....50....60....70....80....90. done.
Applying patches... done.
Fetching 133 new ports or files... done.

Once the latest ports collection snapshot has been downloaded and processed, apply it to your current ports collection by issueing the following command.

# portsnap extract
/usr/ports/.cvsignore
/usr/ports/CHANGES
/usr/ports/COPYRIGHT
/usr/ports/GIDs
/usr/ports/KNOBS
/usr/ports/LEGAL
/usr/ports/MOVED
/usr/ports/Makefile
/usr/ports/Mk/bsd.apache.mk
/usr/ports/Mk/bsd.autotools.mk

/usr/ports/Mk/bsd.cmake.mk
...

That’s it!  Your ports collection is now up-to-date with the latest snapshot from the STABLE branch of the ports collection.  To combine these steps into one command, perhaps for use in a cron job, you can execute the following command.

# portsnap fetch update

NOTE: It is important to make sure that you are not using the ports collection (i.e. in the middle of an installation) when upgrading the ports collection to the latest stable snapshot.

[EoF]
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: