[Dctrl-tools-devel] Bug#513475: Bug#513475: support to join / normalize multi-line 822 stanzas

Stefano Zacchiroli zack at debian.org
Thu Jan 29 17:47:52 UTC 2009


On Thu, Jan 29, 2009 at 06:06:44PM +0200, Antti-Juhani Kaijanaho wrote:
> On Thu, Jan 29, 2009 at 02:19:31PM +0100, Stefano Zacchiroli wrote:
> > 1) always join
> > 2) join by default, offer flag to avoid joining
> > 3) do not join by default, offer flag to join
> 
> I prefer 3.  I don't like breaking invariants that user scripts might depend
> on.  (Though I'm open to arguments demonstrating that such scripts are unlikely
> to exist.)

I take my chance then :)

I see as quite hard that currently there are too many scripts relying
on the current behavior because:

- mostly grep-* tools are used on APT lists coming from the archive
  (which is not my use case, I want to grep single debian/control-s)

- lists coming from the archive do not have multi-line 822 fields
  because dpkg-gencontrol normalizes them away

- even for local debian/control files, the multi-line feature have
  been allowed by policy only relatively recently

There is an exception though: the grepping of Description and relying
on the fact that removing the first line of it will give you the long
description. I'm quite confident that even this case is not that
common because using plain head/tail cmdline tools removing the first
n lines of an output ain't the easiest use case. Still, it was worth
pointing out the exception.


The main reason why I would prefer not to go for (3) is that I'm
trying to understand whether grep-dctrl as it is can be a quick tool
to use to grep debian/control-s. Already as it is it would require
weird usage patterns like "-s Depends -F Depends ''", additionally
requiring an extra flag to join would made that even more
cumbersome. So, if you really want the flag, I pledge for (2).


Of course the decision is yours, and I'll respect it.

> Might also want to consider whether the other dctrl-outputting tools
> need the option.

ACK, once we have an answer on the above point, I'll have a look at
them too.

Thanks for the quick feedback.
Cheers.

-- 
Stefano Zacchiroli -o- PhD in Computer Science \ PostDoc @ Univ. Paris 7
zack@{upsilon.cc,pps.jussieu.fr,debian.org} -<>- http://upsilon.cc/zack/
Dietro un grande uomo c'è ..|  .  |. Et ne m'en veux pas si je te tutoie
sempre uno zaino ...........| ..: |.... Je dis tu à tous ceux que j'aime





More information about the Dctrl-tools-devel mailing list