Downgrading Erlang macports to R13B04

July 9, 2010 2 Comments by Richard

The problem

I’ve been using couchdb a lot lately, and I really like it; unfortunately, someone isn’t really on the ball in the MacPorts world.  They upgraded erlang in macports to default to R14A, which breaks backwards compatibility for a *lot* of other ports, including couchdb.  We’re going to change that so that we get a version compatible with couchdb.

Downgrading erlang

The last revision that had the version of erlang that we want was 64916.  First thing we need to do is check out erlang for that revision.  I’m going to store my “local” macports repo in /Users/Shared/dports/:

$ mkdir /Users/Shared/dports && cd /Users/Shared/dports
$ svn co --revision 64916 http://svn.macports.org/repository/macports/trunk/dports/lang/erlang lang/erlang

You should now have the local repository files that you need.  Add the path to your local repository to /opt/local/etc/macports/sources.conf before the rsync line:

file:///Users/Shared/dports
rsync://rsync.macports.org/release/ports/ [default]

now run portindex to get MacPorts to see the “new” (old?) version.

$ sudo portindex /Users/Shared/dports/

now if you do “port list” you should see:

erlang                         @R13B04         lang/erlang

and you can install it simply with “sudo port install erlang”

Port install log

$ sudo port install erlang
--->  Computing dependencies for erlang
--->  Fetching erlang
--->  Attempting to fetch otp_src_R13B04.tar.gz from http://distfiles.macports.org/erlang
--->  Attempting to fetch otp_doc_man_R13B04.tar.gz from http://distfiles.macports.org/erlang
--->  Attempting to fetch otp_doc_html_R13B04.tar.gz from http://distfiles.macports.org/erlang
--->  Verifying checksum(s) for erlang
--->  Extracting erlang
--->  Applying patches to erlang
--->  Configuring erlang
--->  Building erlang
--->  Staging erlang into destroot
--->  Installing erlang @R13B04_0
--->  Activating erlang @R13B04_0
--->  Cleaning erlang

Credits

Special thanks to Joe Homs for his blog post on doing the same thing with Ruby that I was able to tweak to work with erlang!