From 7855aaa8f1b41d167a6c23815e8b766b765b3e76 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mar 26 2017 11:12:10 +0000 Subject: ghc-pkg < 8 only accepts pkg-ver not pkg-ver-id_hash --- diff --git a/ghc-deps.sh b/ghc-deps.sh index e4d1f77..d651d46 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -17,13 +17,18 @@ case $mode in *) echo "`basename $0`: Need --provides or --requires" ; exit 1 esac +ghc_ver=$(basename $pkgbasedir | sed -e s/ghc-//) + files=$(cat) for i in $files; do case $i in # exclude builtin_rts.conf $pkgconfdir/*-*.conf) - id=$(grep "id: " $i | sed -e "s/id: //") + case $ghc_ver in + 8.*) id=$(grep "id: " $i | sed -e "s/id: //") ;; + *) id=$(echo $i | sed -e "s%$pkgconfdir/%%" -e "s%.conf%%") ;; + esac ids=$($ghc_pkg field $id $field | sed -e "s/rts//" -e "s/bin-package-db-[^ ]\+//") for d in $ids; do diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 4a91f6c..4ba25c3 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -161,6 +161,7 @@ EOF * Fri Mar 24 2017 Jens Petersen - 1.6.19-1 - fix haddock generation - cabal_configure now outputs Cabal version +- fix ghc-deps.sh for ghc-pkg < 8 which does not accept pkg id * Thu Mar 16 2017 Jens Petersen - 1.6.18-3 - condition obsoletes on fedora version