From 8e076b6ee55f09e36eede06e4259a058101d625c Mon Sep 17 00:00:00 2001 From: brandon s allbery kf8nh Date: Sat, 26 Oct 2024 14:02:27 -0400 Subject: [PATCH] final fixups to sdist check validated on 3.12 branch and applied in backport of #10448; this brings the fixes up to `master` --- .github/workflows/check-sdist.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-sdist.yml b/.github/workflows/check-sdist.yml index 9813d3931e0..70d76cdfe77 100644 --- a/.github/workflows/check-sdist.yml +++ b/.github/workflows/check-sdist.yml @@ -71,9 +71,9 @@ jobs: # (don't look at this too closely) sdist="$(ls dist-newstyle/sdist/cabal-install-*.tar.gz | sed -n '\,^dist-newstyle/sdist/cabal-install-[0-9.]*\.tar\.gz$,{;p;q;}')" # extract the cabal-install major version - ver="$(echo "$sdist" | sed -n 's,^dist-newstyle/sdist/cabal-install-\([0-9][0-9]*\.[0-9][0-9]*\)\.[0-9.]*$,\1,p')" + ver="$(echo "$sdist" | sed -n 's,^dist-newstyle/sdist/cabal-install-\([0-9][0-9]*\.[0-9][0-9]*\)\.[0-9.]*\.tar\.gz$,\1,p')" # dunno if this will ever be extended to freebsd, but grep -q is a gnu-ism - if ghc-pkg --global --simple-output list Cabal | grep "^Cabal-$cbl\\." >/dev/null; then + if ghc-pkg --global --simple-output list Cabal | grep "^Cabal-$ver\\." >/dev/null; then # sigh, someone broke installing from tarballs rm -rf cabal*.project Cabal Cabal-syntax cabal-install-solver cabal-install tar xfz "$sdist"