Merge pull request #180091 from thefloweringash/check-case-insensitive-path-conflicts

nixpkgs-basic-release-checks: check for case-insensitive path conflicts
This commit is contained in:
Domen Kožar 2022-07-11 20:05:04 -05:00 committed by GitHub
commit d632b9657c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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