[Dctrl-tools-devel] Bug#525525: Bug#525525: do not separate stanzas with empty lines when showing Description field only

Antti-Juhani Kaijanaho antti-juhani at kaijanaho.fi
Sat Aug 8 07:53:54 UTC 2009


On Sat, Apr 25, 2009 at 11:18:01AM +0200, Stefano Zacchiroli wrote:
> Hi, I was used to see the output of the various grep-dctrl tools as
> stanzas separated by empty lines. That makes such output RFC822
> compliant and parseable with related tools, including python-debian.
> 
> However, I noticed that if I specify as output field only
> "Description", the empty lines separating output stanzas are not
> there. Quick examples to show the problem:
[...]
> 
> The problem is reproducible with the various grep-* tools. I've found
> no other fields acting as Description, so my best guess is that the
> bug relies somewhere in the code handling multi-line fields.

It's not a bug, it's a feature, going waaaaay back to the early versions of
grep-dctrl.  It is caused by this conditional statement:
   if (args.num_show_fields > 1) puts("");
in the output code.  And incidentally, it is independent of the name of the
single field - I have no idea why you weren't able to reproduce this with
fields other than Description (I was able to reproduce it with Maintainer,
too).

I don't remember why I wrote it like that.  Probably to make it more
"user friendly", $DEITY help me.

There's a lot to be said in favor of consistency of output format, but I am a
bit wary of changing longstanding practice, since there might be user scripts
relying on this behavior.

Any comments, anyone?

-- 
Antti-Juhani Kaijanaho, Jyväskylä, Finland
http://antti-juhani.kaijanaho.fi/newblog/
http://www.flickr.com/photos/antti-juhani/
-------------- 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/20090808/e927ed75/attachment.pgp>


More information about the Dctrl-tools-devel mailing list