[Dctrl-tools-devel] Bug#498360: -X <pattern> doesn't match

Antti-Juhani Kaijanaho antti-juhani at kaijanaho.fi
Tue Jan 6 18:47:14 UTC 2009

package dctrl-tools
clone 498360 -1
severity 498360 wishlist
retitle 498360 grep-dctrl -X is useless when not restricting to a field
retitle -1 the full paragraph should not include its final newline

On Tue, Sep 09, 2008 at 02:04:59PM +0200, Loïc Minier wrote:
>  I'd have expected the last command to match "Package: gedit" in all
>  fields.
>  I think this a bug in the parser, it might be that it tries matching
>  the whole list of fields and not field by field?

That's exactly what it does.  I'm not sure it's a bug, though.  Certainly it is

8<--- from grep-dctrl(1) ------------
By default, the search is a case-sensitive fixed substring match
on each paragraph (in other words, package record) in the input.
       -X, --exact-match
              Do an exact match (as opposed to a substring match) in the  cur‐
              rent simple filter.

Granted, the -X option is a bit useless without restricting to all fields.
Classifying as a wishlist.

>  This doesn't work either:
>  echo "Package: gedit" | grep-dctrl -n -s Package "Package: gedit"
>  But this works:
> % echo "Package: gedit" | grep-dctrl -n -X -s Package "Package: gedit
> "
> gedit
>  NB: embedded newline in the last pattern

Ok, that's a separate issue, I think.  Cloning.

Antti-Juhani Kaijanaho, Jyväskylä, Finland
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/dctrl-tools-devel/attachments/20090106/d9a2bb67/attachment-0001.pgp 

More information about the Dctrl-tools-devel mailing list