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:
parent
022ec3dbb7
commit
f2296aab89
1 changed files with 6 additions and 2 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Reference in a new issue