1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-11-15 13:55:09 -05:00

makepkg: improve srcdir check and add pkgdir

The checking of the package for $srcdir references was overly
sensitive and gave a lot of what appear to be false positives with
binary files (in particular with debugging symbols kept).

Restrict the search for $srcdir to non-binary files as this should
still catch the majority of configuration issues the check was
initially designed to catch. Also, add a similar check for $pkgdir.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Allan McRae 2010-09-29 21:54:31 +10:00 committed by Dan McGee
parent 022ec3dbb7
commit f2296aab89

View File

@ -972,10 +972,14 @@ check_package() {
fi fi
done done
# check for references to the build directory # check for references to the build and package directory
if find "${pkgdir}" -type f -exec grep -q "${srcdir}" {} +; then if find "${pkgdir}" -type f -exec grep -q -I "${srcdir}" {} +; then
warning "$(gettext "Package contains reference to %s")" "\$srcdir" warning "$(gettext "Package contains reference to %s")" "\$srcdir"
fi fi
if find "${pkgdir}" -type f -exec grep -q -I "${pkgdir}" {} +; then
warning "$(gettext "Package contains reference to %s")" "\$pkgdir"
fi
} }
create_package() { create_package() {