[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#240887: Package building problem.



reopen 243885
reassign 240887 dash
retitle 240887 fnmatch(3) is broken
quit

On Fri, Apr 16, 2004 at 08:09:05AM +1000, herbert wrote:
> 
> On Thu, Apr 15, 2004 at 03:10:58PM +0100, Colin Watson wrote:
>
> > Accordingly, I believe that the pattern in your example means
> > "backslash, followed by a, followed by closing square bracket", not what
> > you think it means.
> 
> You're quite right.  This is reaffirmed by the POSIX document for
> basic regular expressions, which is what POSIX uses to define
> shell patterns.

Sorry guys, but this turns out to be wrong.  POSIX has an additional
paragraph which I skipped earlier:

: When pattern matching is used where shell quote removal is not performed
: (such as in the argument to the find -name primary when find is being
: called using one of the exec functions as defined in the System
: Interfaces volume of IEEE Std 1003.1-200x, or in the pattern argument
: to the fnmatch( ) function), special characters can be escaped to remove
: their special meaning by preceding them with a backslash character. This
: escaping back slash is discarded. The sequence "\\" represents one literal
: backslash. All of the requirements and effects of quoting on ordinary,
: shell special, and special pattern characters shall apply to escaping
: in this context.

This clearly says that backslashes must be interpreted.
-- 
Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



Reply to: