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/
signature.asc
Description: Digital signature