summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2013-07-29 12:31:35 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2013-07-29 12:31:35 +0000
commit287c38758c70585fdfcaf86870983042e4ff025a (patch)
treed50b604e65d48c786845e992c8991cba08f6724e /eclass
parentFix install on Darwin by Hugh Nowlan, bug #437362 (diff)
downloadgentoo-2-287c38758c70585fdfcaf86870983042e4ff025a.tar.gz
gentoo-2-287c38758c70585fdfcaf86870983042e4ff025a.tar.bz2
gentoo-2-287c38758c70585fdfcaf86870983042e4ff025a.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/ChangeLog6
-rw-r--r--eclass/haskell-cabal.eclass23
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 "$@"
}