Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Sat, 30 Jan 2021 09:54:51
Message-Id: 1612000478.90c014c455793cc026666b108fe37adc642e1f22.slyfox@gentoo
1 commit: 90c014c455793cc026666b108fe37adc642e1f22
2 Author: Wolfgang E. Sanyer <WolfgangESanyer <AT> gmail <DOT> com>
3 AuthorDate: Sun Dec 27 05:03:47 2020 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 30 09:54:38 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90c014c4
7
8 haskell-cabal.eclass: add CABAL_FEATURE=rebuild-after-doc-workaround
9
10 This is added as a temporary workaround until [this upstream][1] issue
11 can be closed out
12
13 [1]: https://github.com/haskell/cabal/issues/7213
14
15 Signed-off-by: Wolfgang E. Sanyer <WolfgangESanyer <AT> gmail.com>
16 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
17
18 eclass/haskell-cabal.eclass | 16 ++++++++++++++++
19 1 file changed, 16 insertions(+)
20
21 diff --git a/eclass/haskell-cabal.eclass b/eclass/haskell-cabal.eclass
22 index 8706cc99478..505eab43738 100644
23 --- a/eclass/haskell-cabal.eclass
24 +++ b/eclass/haskell-cabal.eclass
25 @@ -29,6 +29,15 @@
26 # only used for packages that use libghc internally and _must_
27 # not pull upper versions
28 # test-suite -- add support for cabal test-suites (introduced in Cabal-1.8)
29 +# rebuild-after-doc-workaround -- enable doctest test failue workaround.
30 +# Symptom: when `./setup haddock` is run in a `build-type: Custom`
31 +# package it might cause cause the test-suite to fail with
32 +# errors like:
33 +# > <command line>: cannot satisfy -package-id singletons-2.7-3Z7pnljD8tU1NrslJodXmr
34 +# Workaround re-reginsters the package to avoid the failure
35 +# (and rebuilds changes).
36 +# FEATURE can be removed once https://github.com/haskell/cabal/issues/7213
37 +# is fixed.
38
39 inherit eutils ghc-package multilib toolchain-funcs
40
41 @@ -99,6 +108,7 @@ for feature in ${CABAL_FEATURES}; do
42 nocabaldep) CABAL_FROM_GHC=yes;;
43 ghcdeps) CABAL_GHC_CONSTRAINT=yes;;
44 test-suite) CABAL_TEST_SUITE=yes;;
45 + rebuild-after-doc-workaround) CABAL_REBUILD_AFTER_DOC_WORKAROUND=yes;;
46
47 # does nothing, removed 2016-09-04
48 bin) ;;
49 @@ -554,6 +564,12 @@ cabal_src_compile() {
50 cabal-haddock
51 fi
52 fi
53 + if [[ -n "${CABAL_REBUILD_AFTER_DOC_WORKAROUND}" ]]; then
54 + ewarn "rebuild-after-doc-workaround is enabled. This is a"
55 + ewarn "temporary worakround to deal with https://github.com/haskell/cabal/issues/7213"
56 + ewarn "until the upstream issue can be resolved."
57 + cabal-build
58 + fi
59 else
60 if [[ -n "${CABAL_USE_HSCOLOUR}" ]] && use hscolour; then
61 if [[ -n "${CABAL_USE_HOOGLE}" ]] && use hoogle; then