diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2012-07-08 19:16:46 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2012-07-08 19:16:46 +0000 |
commit | e4a5814846791f67df0decb2cc473e8ee9bbf6ca (patch) | |
tree | 7c6ece0d822dedd5a607544a6c5d14de03096dcd /eclass | |
parent | Re-assign to maintainer-needed. (diff) | |
download | historical-e4a5814846791f67df0decb2cc473e8ee9bbf6ca.tar.gz historical-e4a5814846791f67df0decb2cc473e8ee9bbf6ca.tar.bz2 historical-e4a5814846791f67df0decb2cc473e8ee9bbf6ca.zip |
Allow wildcards in CABAL_CORE_LIB_GHC_PV. Guard against breakage of ghc-shipped libraries.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ChangeLog | 6 | ||||
-rw-r--r-- | eclass/haskell-cabal.eclass | 23 |
2 files changed, 26 insertions, 3 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index fbce852d43c1..9269c193d49b 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for eclass directory # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.337 2012/07/08 12:38:10 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.338 2012/07/08 19:16:46 slyfox Exp $ + + 08 Jul 2012; Sergei Trofimovich <slyfox@gentoo.org> haskell-cabal.eclass: + Allow wildcards in CABAL_CORE_LIB_GHC_PV. Guard against breakage of + ghc-shipped libraries. 08 Jul 2012; Diego E. Pettenò <flameeyes@gentoo.org> ruby-ng.eclass: Add a function to wrap around testrb-2 as well. diff --git a/eclass/haskell-cabal.eclass b/eclass/haskell-cabal.eclass index 911f5d63a466..28e840fa5e8f 100644 --- a/eclass/haskell-cabal.eclass +++ b/eclass/haskell-cabal.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.32 2012/04/19 17:33:19 slyfox Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.33 2012/07/08 19:16:46 slyfox Exp $ # @ECLASS: haskell-cabal.eclass # @MAINTAINER: @@ -352,7 +352,7 @@ cabal-pkg() { # You can also put a space separated list, eg CABAL_CORE_LIB_GHC_PV="6.6 6.6.1". cabal-is-dummy-lib() { for version in ${CABAL_CORE_LIB_GHC_PV[*]}; do - [[ "$(ghc-version)" == "$version" ]] && return 0 + [[ "$(ghc-version)" == ${version} ]] && return 0 done return 1 } @@ -461,6 +461,25 @@ cabal_src_install() { dodir ${ghc_confdir_with_prefix#${EPREFIX}} local conf_file="${D}/$(ghc-confdir)/$(ghc-localpkgconf)" [[ -e $conf_file ]] || echo '[]' > "$conf_file" || die + + # make sure installed packages do not destroy ghc's + # bundled packages + local initial_pkg_db=${ROOT}/$(ghc-libdir)/package.conf.d.initial + if [[ -e ${initial_pkg_db} ]]; then + local checked_pkg + for checked_pkg in $(ghc-listpkg "${conf_file}") + do + local initial_pkg + for initial_pkg in $(ghc-listpkg "${initial_pkg_db}"); do + if [[ ${checked_pkg} = ${initial_pkg} ]]; then + eerror "Package ${checked_pkg} is shipped with $(ghc-version)." + eerror "Ebuild author forgot CABAL_CORE_LIB_GHC_PV entry." + eerror "Found in ${initial_pkg_db}." + die + fi + done + done + fi } haskell-cabal_src_install() { |