diff options
author | Thomas Bächler <thomas@archlinux.org> | 2010-06-28 13:31:59 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-06-30 08:27:29 -0500 |
commit | d7c98d4e45f614495399636bf02bc718e4a90ab8 (patch) | |
tree | 1f38737a35e8398bbf167b9d35861159ac1f38bc | |
parent | 21d5dedfddb290da4e9beafe3e28abcdee1b7091 (diff) |
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>
-rw-r--r-- | scripts/makepkg.sh.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 2699f637..c4c9866c 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -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 } |