makepkg: Only check regular files in $srcdir check

The 'grep -R' in the $srcdir check would not only grep regular files,
but also devices, symlinks (that might potentially point outside of
$pkgdir), pipes and so on. Use find to ensure only regular files are
examined.

This should fix https://bugs.archlinux.org/task/19975

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Thomas Bächler 2010-06-28 13:31:59 +02:00 committed by Dan McGee
parent 21d5dedfdd
commit d7c98d4e45
1 changed files with 1 additions and 1 deletions

View File

@ -980,7 +980,7 @@ check_package() {
done
# check for references to the build directory
if grep -R "${srcdir}" "${pkgdir}" &>/dev/null; then
if find "${pkgdir}" -type f -exec grep -q "${srcdir}" {} +; then
warning "$(gettext "Package contains reference to %s")" "\$srcdir"
fi
}