tag 375506 - patch
thanks

On Wed, Jul 05, 2006 at 05:41:54PM +1000, Brendan O'Dea wrote:
> On Sat, Jul 01, 2006 at 07:07:11PM +0200, Nicolas François wrote:
> >On Thu, Jun 29, 2006 at 05:43:48PM +1000, Brendan O'Dea wrote:
> >> We could do something similar for --search (see patch following),
> >> although note that while this means that '-S /usr/bin/[' now works,
> >> '-S [' will not.
> >
> >Just a variation of your patch with strstr instead of strcmp, '-S [' works.
> 
> It also changes the behaviour a little.  Consider
> 'dpkg -S /usr/share/man/man1/\[', which now matches the man page.
> 
> Probably not a huge issue given the number of paths which actually do
> contain metacharacters, but the intent was simply to make
> 'dpkg -S /full/path' work reliably (i.e. where did that file come from?).

Just for the record, I would opose both patches on the ground of very
confusing and undefined behaviour.

A more complete and less confusing patch would probably have to store
the original string before the leading and trailing '*' are inserted,
escape all wildcards in it, then conditionally add the '*'s and
make every match twice, one time with the escaped string.

Gruesse,
-- 
Frank Lichtenheld <[EMAIL PROTECTED]>
www: http://www.djpig.de/

Reply via email to