From f2296aab89b12fe49204fba8f62dc8dd2d9e05eb Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Wed, 29 Sep 2010 21:54:31 +1000 Subject: 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 Signed-off-by: Dan McGee --- scripts/makepkg.sh.in | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index ed1380d1..9bcd4460 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -972,10 +972,14 @@ check_package() { fi done - # check for references to the build directory - if find "${pkgdir}" -type f -exec grep -q "${srcdir}" {} +; then + # check for references to the build and package directory + if find "${pkgdir}" -type f -exec grep -q -I "${srcdir}" {} +; then warning "$(gettext "Package contains reference to %s")" "\$srcdir" fi + if find "${pkgdir}" -type f -exec grep -q -I "${pkgdir}" {} +; then + warning "$(gettext "Package contains reference to %s")" "\$pkgdir" + fi + } create_package() { -- cgit v1.2.3-70-g09d2