diff options
author | Moritz Angermann <moritz.angermann@gmail.com> | 2019-01-18 10:05:41 +0800 |
---|---|---|
committer | Moritz Angermann <moritz.angermann@gmail.com> | 2019-01-18 10:08:32 +0800 |
commit | b927417984187d09602c78b49d8d08debfc208d4 (patch) | |
tree | 09fc3a664dc50cf77ec7dc8d0041281b16e6afd5 | |
parent | 076f5862a9e46eef762ba19fb7b14e75fa03c2c0 (diff) | |
download | haskell-wip/T16199.tar.gz |
Adds a veriy-packages script to ensure ghc and hackage agree on package source and versionwip/T16199
-rwxr-xr-x | utils/verify-release/verify-packages.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/utils/verify-release/verify-packages.sh b/utils/verify-release/verify-packages.sh new file mode 100755 index 0000000000..4d3a385491 --- /dev/null +++ b/utils/verify-release/verify-packages.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# This script will veriy that the packages in ghc, +# correspond to packages on hackage. +rm -fR ghc-packages hackage-packages package-diffs +mkdir -p ghc-packages hackage-packages package-diffs +# We'll skip Cabal and tarballs, while looking only at packages in libraries +# the we reference as gitmodules. +for lib in $(git submodule status|grep libraries|grep -v tarballs|grep -v Cabal|awk -F\ '{ print $2 }'); do + (cd $lib && cabal new-sdist -o ../../ghc-packages); +done + +for pkg in $(cd ghc-packages && ls *.tar.gz); do + PKG=${pkg%%.tar.gz} + (cd hackage-packages && cabal get --pristine ${PKG}) + (cd ghc-packages && tar xzf $pkg) + diff -ur hackage-packages/${PKG} ghc-packages/${PKG} \ + | sed "s/hackage-packages\/${PKG}/hackage-package-${PKG}/"g \ + | sed "s/ghc-packages\/${PKG}/ghc-package-${PKG}/"g \ + > package-diffs/${PKG}.patch +done +ls -lah package-diffs |