]> git.donarmstrong.com Git - debhelper.git/commitdiff
dh: Use $(filter) rather than $(findstring)
authorRoger Leigh <rleigh@debian.org>
Mon, 22 Nov 2010 21:03:24 +0000 (21:03 +0000)
committerJoey Hess <joey@kitenet.net>
Mon, 22 Nov 2010 21:52:50 +0000 (17:52 -0400)
$(findstring) can match partial strings and so is unreliable when a
package builds several binary packages and one package contains the
name of another package within its name.  In these cases,
$(findstring) can return a partial match which leads to problems
(performing unwanted actions which could lead to build failure, for
example).

$(filter) matches the entire string in the wordlist, so is a
reliable replacement for $(findstring).

Signed-off-by: Roger Leigh <rleigh@debian.org>
dh

diff --git a/dh b/dh
index d2771abbbf83cc764d14edabc234de2e2901ade7..21863dde215e4a3ca29c9f551d5b03ef9d258718 100755 (executable)
--- a/dh
+++ b/dh
@@ -233,7 +233,7 @@ L<dh_listpackages(1)> to test what is being built. For example:
        
        override_dh_fixperms:
                dh_fixperms
-       ifneq (,$(findstring foo, $(shell dh_listpackages)))
+       ifneq (,$(filter foo, $(shell dh_listpackages)))
                chmod 4755 debian/foo/usr/bin/foo
        endif