diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2013-07-29 12:31:35 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2013-07-29 12:31:35 +0000 |
commit | 95a8b82820e494f749b3f9d547b1af0c4ee754de (patch) | |
tree | 0ad9f293acc75be43fe14183674055c81fa9ef4a /eclass | |
parent | Fix install on Darwin by Hugh Nowlan, bug #437362 (diff) | |
download | historical-95a8b82820e494f749b3f9d547b1af0c4ee754de.tar.gz historical-95a8b82820e494f749b3f9d547b1af0c4ee754de.tar.bz2 historical-95a8b82820e494f749b3f9d547b1af0c4ee754de.zip |
ask user to run haskell-updater for old packages (like in bug http://bugs.gentoo.org/474840)
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ChangeLog | 6 | ||||
-rw-r--r-- | eclass/haskell-cabal.eclass | 23 |
2 files changed, 22 insertions, 7 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index 918e63c3ab20..a28fc370d1c4 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for eclass directory # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.902 2013/07/29 09:53:36 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.903 2013/07/29 12:31:35 slyfox Exp $ + + 29 Jul 2013; Sergei Trofimovich <slyfox@gentoo.org> haskell-cabal.eclass: + ask user to run haskell-updater for old packages (like in bug + http://bugs.gentoo.org/474840) 29 Jul 2013; Justin Lecher <jlec@gentoo.org> fortran-2.eclass: Fortran-2.eclass: enhance support for binary packages, #477070 diff --git a/eclass/haskell-cabal.eclass b/eclass/haskell-cabal.eclass index b69fd8fd4a0f..cc61108418b8 100644 --- a/eclass/haskell-cabal.eclass +++ b/eclass/haskell-cabal.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.40 2013/05/11 12:46:32 slyfox Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.41 2013/07/29 12:31:35 slyfox Exp $ # @ECLASS: haskell-cabal.eclass # @MAINTAINER: @@ -242,22 +242,33 @@ cabal-hscolour-haddock() { ./setup "$@" --hyperlink-source || die "setup haddock --hyperlink-source failed" } +cabal-die-if-nonempty() { + local breakage_type=$1 + shift + + [[ "${#@}" == 0 ]] && return 0 + eerror "Detected ${breakage_type} packages: ${@}" + die "//==-- Please, run 'haskell-updater' to fix ${breakage_type} packages --==//" +} + cabal-show-brokens() { # pretty-printer $(ghc-getghcpkg) check 2>&1 \ | egrep -v '^Warning: haddock-(html|interfaces): ' \ | egrep -v '^Warning: include-dirs: ' - set -- $($(ghc-getghcpkg) check --simple-output) - [[ "${#@}" == 0 ]] && return 0 - - eerror "Detected broken packages: ${@}" + cabal-die-if-nonempty 'broken' \ + $($(ghc-getghcpkg) check --simple-output) +} - die "//==-- Please, run 'haskell-updater' to fix broken packages --==//" +cabal-show-old() { + cabal-die-if-nonempty 'outdated' \ + $("${EPREFIX}"/usr/sbin/haskell-updater --quiet --upgrade --list-only) } cabal-show-brokens-and-die() { cabal-show-brokens + cabal-show-old die "$@" } |