From b8579a2d2a75c9d9cad5957eea63855a2e14a91d Mon Sep 17 00:00:00 2001 From: Harendra Kumar Date: Wed, 21 Oct 2026 05:25:56 +0530 Subject: [PATCH] Remove a previously unpacked sdist before unpacking it again A BUILD_DEPS_ONLY run followed by a BUILD_PACKAGE_ONLY run unpacks the sdist into the same .packcheck directory twice. The first run creates an explicit cabal.project there; unpacking over it kept that file and the second run then failed the project file check with "Use DISABLE_SDIST_PROJECT_CHECK=y to allow this". --- packcheck.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packcheck.sh b/packcheck.sh index c6336b2f..b0ef9a10 100755 --- a/packcheck.sh +++ b/packcheck.sh @@ -1969,6 +1969,12 @@ then add them to .packcheck.ignore file at the root of the git repository." echo "cd .packcheck" cd .packcheck || exit 1 test "${tarpath:0:1}" == / || tarpath=../$tarpath + # Remove the sdist unpacked by an earlier run (e.g. a BUILD_DEPS_ONLY run + # followed by a BUILD_PACKAGE_ONLY run). Unpacking over it would keep the + # files that run created, such as the explicit cabal.project below, and + # the project file check would then fail. + test -n "${1}" || die "create_and_unpack_pkg_dist: empty package name" + run_verbose_errexit rm -rf "${1}" $OS_UNGZTAR_CMD $tarpath # NOTE: We are entering the sdist directory inside .packcheck now. The