Bug fix for install.sh

Lyle Kopnicky lyle at qseep.net
Fri Sep 11 21:41:56 EDT 2009


Hi folks,

I had trouble installing the Haskell Platform 2009.2.0.2 from source on
Ubuntu 9.04 with an existing GHC 6.10.4 installation. The problem was that
some packages were already installed. The build.sh script was smart enough
to avoid building packages that were already installed, but the install.sh
script assumed all package directories would have been built. The fix is
this patch:

36a37,42
> # Is this exact version of the package already installed?
> is_pkg_installed () {
>   PKG_VER=$1
>   grep " ${PKG_VER} " installed.packages > /dev/null 2>&1
> }
>
40,43c46,53
<   cd "${pkg}" || die "The directory for the component ${PKG} is missing"
<   echo "Installing ${pkg}..."
<   install_pkg ${pkg}
<   cd ..
---
>   if is_pkg_installed "${pkg}"; then
>     echo "Platform package ${pkg} is already installed. Skipping..."
>   else
>       cd "${pkg}" || die "The directory for the component ${PKG} is
missing"
>       echo "Installing ${pkg}..."
>       install_pkg ${pkg}
>       cd ..
>   fi

- Lyle
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.haskell.org/pipermail/haskell-platform/attachments/20090911/c392a275/attachment.htm 


More information about the Haskell-platform mailing list