5 # ---------------------------------------------------------------------
6 # Bootstrap cabal, to verify bootstrap.sh script works.
7 # ---------------------------------------------------------------------
11 (cd cabal-install
&& timed env EXTRA_CONFIGURE_OPTS
="" .
/bootstrap.sh
$bootstrap_jobs --no-doc)
12 timed
$HOME/.cabal
/bin
/cabal
--version
13 PATH
=$HOME/.cabal
/bin
:$PATH
15 # ---------------------------------------------------------------------
16 # Verify that installation from tarball works.
17 # ---------------------------------------------------------------------
19 # The following scriptlet checks that the resulting source distribution can be
21 install_from_tarball
() {
22 SRC_TGZ
=$
(cabal info . |
awk '{print $2 ".tar.gz";exit}') ;
24 if [ -f "dist/$SRC_TGZ" ]; then
25 cabal
install --force-reinstalls $jobs "dist/$SRC_TGZ" -v2;
27 echo "expected 'dist/$SRC_TGZ' not found";
34 # NB: The cabal cleans here hack around an sdist bug where
35 # the bootstrapped Cabal/cabal-install may be built
36 # without a Paths_* module available. Under some situations
37 # which I have not been able to reproduce except on Travis,
38 # cabal sdist will incorrectly pick up the left over dist
39 # directory from the bootstrap and then try to package
40 # up the Paths module, but to no avail because it is not
41 # available. I ran out of patience trying to debug this
42 # issue, and it is easy enough to work around: clean first.
45 (cd Cabal
&& timed cabal clean
) ||
exit $?
46 (cd Cabal
&& timed cabal sdist
) ||
exit $?
47 (cd Cabal
&& timed install_from_tarball
) ||
exit $?
50 (cd cabal-install
&& timed cabal clean
) ||
exit $?
51 (cd cabal-install
&& timed cabal sdist
) ||
exit $?
52 (cd cabal-install
&& timed install_from_tarball
) ||
exit $?