Using portdowngrade

Using portdowngrade

February 9, 2010 in FreeBSD

Recently, I needed to roll a port back to a much older revision. While I usually dislike this type of thing, I found it to be necessary this time. Somebody recommended that I use portdowngrade to revert the ports tree to the older version, so I could install it.

Here’s my process:

Verify Anonymous CVS Connectivity

First, you must verify that you can connect to the anoncvs server. You can find instructions in the FreeBSD Handbook for this process.

One thing you should probably be aware of is that there are a very limited number of anoncvs mirrors, which is why I chose the .tw one.

Prepare Your Ports Tree

You need to be sure that you have an updated portsdb installed so portdowngrade is able to find the matching ports with a search.

portsdb -u

Installing & Using portdowngrade

cd /usr/ports/*/portdowngrade
make DEFAULT_CVS_SERVER=\":pserver:anoncvs@anoncvs.tw.freebsd.org:/home/ncvs\" install clean

Note that you may replace the server name with whichever mirror you chose in the earlier step.

Once installed, you may now downgrade the port using:

portdowngrade devel/bugzilla

for instance. From here the documentation will be more than enough to show you how to get the downgraded port checked out and installed.

The Missing Step: Making portupgrade Ignore the Port!

This is easy as pie, but there are two ways to do it. I chose to do both.

Option 1: Edit the pkgtools.conf file

Usually located in /usr/local/etc/, pkgtools.conf will allow you to specify an additional port in the HOLD_PKGS array like such:

HOLD_PKGS = [
    'bsdpan-*',
    'devel/bugzilla*'
]

Option 2: +IGNOREME

Creating a +IGNOREME file in the package directory will stop both portaudit and portmaster from upgrading the port.

touch /var/db/pkg/bugzilla/+IGNOREME

Tags: , , , , , , ,

Copyright © 2009 Christopher J. Umina - Powered by WordPress - Portfolio WordPress Theme by ThemeShift.com.