Package: debhelper
Version: 5.0.17

>From (eg) dh_install(1):

OPTIONS
       -Xitem, --exclude=item
           Exclude files that contain "item" anywhere in their filename from
           being installed.

I found a usage in the firefox debian/rules which assumed that
(i) it's a glob pattern (ii) anchored at both ends.  A quick survey
here suggests that the idea that it's a glob pattern is not uncommon

So I went to check the code, and found this in Dh_Lib.pm:

                        $x=escape_shell($x);
                        $x=~s/\./\\./g;
                        $dh{EXCLUDE_FIND}.="-regex .\\*$x.\\* -or ";

Here $x is the actual parameter string as supplied by the caller, and
the $dh{EXCLUDE_FIND} will be substituted into a big shell string.

The effect is that the argument to -X is treated as a regexp except
that `.' is a literal `.' instead of `any character'.

The exact syntax should be sane, and documented.  I would suggest that
the best syntax is probably: glob pattern, unanchored, except that it
may starts with ^ or end with $ to indicate anchoring.  This will
probably be sufficiently backward-compatible with existing practice
that no compat version specific handling will be needed.

Ian.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to