summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncan Coutts <dcoutts@gentoo.org>2006-08-02 19:52:04 +0000
committerDuncan Coutts <dcoutts@gentoo.org>2006-08-02 19:52:04 +0000
commitb8e2ebbb7b86335012491e7a6a8d25cdac5a760e (patch)
treeccd9068ea1b073687ca4c997dbc12e23ffc701bf /eclass/ghc-package.eclass
parentAsk portage rather than ghc-pkg about which version of cabal to use. (diff)
downloadgentoo-2-b8e2ebbb7b86335012491e7a6a8d25cdac5a760e.tar.gz
gentoo-2-b8e2ebbb7b86335012491e7a6a8d25cdac5a760e.tar.bz2
gentoo-2-b8e2ebbb7b86335012491e7a6a8d25cdac5a760e.zip
The change about how we pick a version of cabal to use as described in the
previous commit. (Oops, committed in two bits, never mind)
Diffstat (limited to 'eclass/ghc-package.eclass')
-rw-r--r--eclass/ghc-package.eclass19
1 files changed, 7 insertions, 12 deletions
diff --git a/eclass/ghc-package.eclass b/eclass/ghc-package.eclass
index 0a68ad212386..b394636959ae 100644
--- a/eclass/ghc-package.eclass
+++ b/eclass/ghc-package.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ghc-package.eclass,v 1.18 2006/08/02 19:49:03 dcoutts Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ghc-package.eclass,v 1.19 2006/08/02 19:52:04 dcoutts Exp $
#
# Author: Andres Loeh <kosmikus@gentoo.org>
# Maintained by: Haskell herd <haskell@gentoo.org>
@@ -61,17 +61,12 @@ ghc-bestcabalversion() {
local cabalpackage
local cabalversion
if ghc-cabal; then
- # Try if ghc-pkg can determine the latest version.
- # If not, use portage.
- cabalpackage="$($(ghc-getghcpkg) latest Cabal 2> /dev/null)"
- if [[ $? -eq 0 ]]; then
- cabalversion="${cabalpackage#Cabal-}"
- else
- cabalpackage="$(best_version cabal)"
- cabalversion="${cabalpackage#dev-haskell/cabal-}"
- cabalversion="${cabalversion%-r*}"
- cabalversion="${cabalversion%_pre*}"
- fi
+ # We ask portage, not ghc, so that we only pick up
+ # portage-installed cabal versions.
+ cabalpackage="$(best_version cabal)"
+ cabalversion="${cabalpackage#dev-haskell/cabal-}"
+ cabalversion="${cabalversion%-r*}"
+ cabalversion="${cabalversion%_pre*}"
echo "Cabal-${cabalversion}"
else
# older ghc's don't support package versioning