makepkg: check for references to build root in package

Add a check that the package does not contain references to the
folder it was built in.

Fixes FS#14751

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Allan McRae 2009-10-25 13:57:20 +10:00 committed by Dan McGee
parent a2c9cbdbdc
commit b805fe58ae
1 changed files with 5 additions and 0 deletions

View File

@ -956,6 +956,11 @@ check_package() {
warning "$(gettext "Invalid backup entry : %s")" "$file"
fi
done
# check for references to the build directory
if grep -R "${srcdir}" "${pkgdir}" &>/dev/null; then
warning "$(gettext "Package contains reference to %s")" "\$srcdir"
fi
}
create_package() {