Package: debhelper
Version: 8.0.0
Severity: normal

>From the attached patch:

$(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).


Thanks,
Roger

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (550, 'unstable'), (400, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.36-trunk-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages debhelper depends on:
ii  binutils                     2.20.1-15   The GNU assembler, linker and bina
ii  dpkg-dev                     1.15.8.5    Debian package development tools
ii  file                         5.04-5      Determines file type using "magic"
ii  html2text                    1.3.2a-15   advanced HTML to text converter
ii  man-db                       2.5.7-6     on-line manual pager
ii  perl                         5.10.1-16   Larry Wall's Practical Extraction 
ii  perl-base                    5.10.1-16   minimal Perl system
ii  po-debconf                   1.0.16+nmu1 tool for managing templates file t

debhelper recommends no packages.

Versions of packages debhelper suggests:
ii  dh-make                       0.55       tool that converts source archives

-- no debconf information
>From 6c03dbdcbf876b41ad5a82e2248fadb056525bef Mon Sep 17 00:00:00 2001
From: Roger Leigh <[email protected]>
Date: Mon, 22 Nov 2010 21:03:24 +0000
Subject: [PATCH] dh: Use $(filter) rather than $(findstring)

$(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 <[email protected]>
---
 dh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dh b/dh
index 3e014fb..0b07973 100755
--- a/dh
+++ b/dh
@@ -235,7 +235,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
 
-- 
1.7.2.3

Reply via email to