[Haskell-cafe] ANNOUNCE: The Haskell Platform 2009.2.0.2

Alecs King alecsk at gmail.com
Mon Aug 3 02:27:57 EDT 2009


On Fri, Jul 31, 2009 at 05:01:07PM -0700, Don Stewart wrote:
> 
> We're pleased to announce the third release of the Haskell Platform: a
> single, standard Haskell distribution for everyone.
> 
> The specification, along with installers (including Windows and Unix
> installers for a full Haskell environment) are available.
> 
> Download the Haskell Platform 2009.2.0.2:
> 
>     http://hackage.haskell.org/platform/

Thanks for the hard work. 

But there's a problem of the source tarball.  scripts/build.sh skips
building already-installed pkgs -- but scripts/install.sh does not skip
installing them.  So 'make install' fails (err: "The ${PKG}/Setup script
does not exist or cannot be run") if there are some pkgs that have been
skipped building.

A quick(-and-dirty) hot fix: -- code copied from build.sh

---
 scripts/install.sh |   18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

Index: haskell-platform-2009.2.0.2/scripts/install.sh
===================================================================
--- haskell-platform-2009.2.0.2.orig/scripts/install.sh
+++ haskell-platform-2009.2.0.2/scripts/install.sh
@@ -34,13 +34,23 @@ install_pkg () {
   fi
 }
 
+# Is this exact version of the package already installed?
+is_pkg_installed () {
+  PKG_VER=$1
+  grep " ${PKG_VER} " installed.packages > /dev/null 2>&1
+}
+
 # Actually do something!
 cd packages
 for pkg in `cat platform.packages`; do
-  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
 done
 
 echo


--
Alecs King


More information about the Haskell-Cafe mailing list