diff options
author | Duncan Coutts <dcoutts@gentoo.org> | 2006-08-02 19:52:04 +0000 |
---|---|---|
committer | Duncan Coutts <dcoutts@gentoo.org> | 2006-08-02 19:52:04 +0000 |
commit | b9283c22307d32df0f934f1ec17341d3f2623918 (patch) | |
tree | e9dcbf647a56fcefee3d63382d1f085584560250 /eclass | |
parent | Ask portage rather than ghc-pkg about which version of cabal to use. (diff) | |
download | historical-b9283c22307d32df0f934f1ec17341d3f2623918.tar.gz historical-b9283c22307d32df0f934f1ec17341d3f2623918.tar.bz2 historical-b9283c22307d32df0f934f1ec17341d3f2623918.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')
-rw-r--r-- | eclass/ghc-package.eclass | 19 |
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 |