[Mono-list] Upgrading Mono from source release: protocol

Gonzalo Paniagua Javier gonzalo.mono at gmail.com
Tue Mar 23 20:38:02 EDT 2010

On Tue, 2010-03-23 at 18:06 -0400, Abe Gillespie wrote:
> A couple of questions:
> 1.  Is there an easy way to install multiple versions in parallel and
> then switch back and forth by a simple config? - if you recall, I had
> an issue a couple of weeks back that took my storefront down when I
> upgraded my Mono version.  It was pretty painful to switch back.  It
> would be nice if I could quickly revert, via config, to the previous
> version.  That way I could go back and forth and test until I could
> get things stable.

I have one function per mono branch in my $HOME/.bashrc that look like:
function mono-HEAD() {
	echo $PATH | grep /opt/mono/bin >/dev/null 2>&1
	if [ $? -ne 0 ] ; then
		export PATH="/opt/mono/bin:$PATH"
		export PKG_CONFIG_PATH="/opt/mono/lib/pkgconfig:$PKG_CONFIG_PATH"
		export XDG_DATA_HOME="$XDG_DATA_HOME":/opt/mono/share
		export MANPATH="/opt/mono/man:/opt/subversion/man:$MANPATH"
		export LD_LIBRARY_PATH="/opt/mono/lib:/opt/subversion/lib:$LD_LIBRARY_PATH"
		export MOZILLA_FIVE_HOME=$(pkg-config --variable=sdkdir mozilla-gtkmozembed)

function mono-2-6() {
	echo $PATH | grep /opt/mono-2-6/bin >/dev/null 2>&1
	if [ $? -ne 0 ] ; then
		export PATH="/opt/mono-2-6/bin:$PATH"
		export PKG_CONFIG_PATH="/opt/mono-2-6/lib/pkgconfig:$PKG_CONFIG_PATH"
		export XDG_DATA_HOME="$XDG_DATA_HOME":/opt/mono-2-6/share
		export MANPATH="/opt/mono-2-6/man:/opt/subversion/man:$MANPATH"
		export LD_LIBRARY_PATH="/opt/mono-2-6/lib:/opt/subversion/lib:$LD_LIBRARY_PATH"
		export MOZILLA_FIVE_HOME=$(pkg-config --variable=sdkdir mozilla-gtkmozembed)

and so on. By default, I use the system-wide installation and then
execute 'mono-HEAD' or 'mono-2-6' from the command line to use a
particular version in that terminal.


More information about the Mono-list mailing list