nixpkgs-basic-release-checks: check for case-insensitive path conflicts

This commit is contained in:
Andrew Childs 2022-07-04 17:46:13 +09:00
parent 2e37f787c9
commit cb730cf239

View File

@ -19,6 +19,14 @@ pkgs.runCommand "nixpkgs-release-checks" { src = nixpkgs; buildInputs = [nix]; }
exit 1
fi
# Make sure that no paths collide on case-preserving or case-insensitive filesysytems.
conflictingPaths=$(find $src | awk '{ print $1 " " tolower($1) }' | sort -k2 | uniq -D -f 1 | cut -d ' ' -f 1)
if [[ -n $conflictingPaths ]]; then
echo "Files in nixpkgs must not vary only by case"
echo "The offending paths: $conflictingPaths"
exit 1
fi
src2=$TMPDIR/foo
cp -rd $src $src2