FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 02-01-2011, 04:02 PM
Nezmer
 
Default makepkg: Fix the check for references to srcdir/pkgdir in BSDs

At least in FreeBSD, find always returns 0 If It finds stuff
(imagine that). It doesn't care about the exit status of whatever is
passed to -exec.

This patch makes the checks compatible with this behaviour.

Using xargs and not using grep directly because packages with too many
files would cause grep to complain about argument list being too long.

This should also fix the false positive in packages with no files.

Signed-off-by: Nezmer <git@nezmer.info>
---
scripts/makepkg.sh.in | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index b1b1b75..72b8035 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1000,10 +1000,10 @@ check_package() {
done

# check for references to the build and package directory
- if find "${pkgdir}" -type f -exec grep -q -I "${srcdir}" {} +; then
+ if find "${pkgdir}" -type f -print0 | xargs -0 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
+ if find "${pkgdir}" -type f -print0 | xargs -0 grep -q -I "${pkgdir}" ; then
warning "$(gettext "Package contains reference to %s")" "$pkgdir"
fi

--
1.7.3.5
 

Thread Tools




All times are GMT. The time now is 08:29 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org