[Dctrl-tools-devel] Bug#513475: Bug#513475: support to join / normalize multi-line 822 stanzas
Stefano Zacchiroli
zack at debian.org
Thu Apr 16 14:05:31 UTC 2009
On Wed, Feb 25, 2009 at 07:52:17PM +0200, Antti-Juhani Kaijanaho wrote:
> > 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.
>
> Description is one example of a field where linebreaks are
> semantically significant. There are others, mainly those that
> contain file identification data (security hashes and names).
>
> I believe such fields should be left unfolded. Should have a
> succinct way to specify non-folding for specific fields,
Agreed, I hereby propose the following command line options to address
that:
* --no-join to request not to do any join at all
* --no-join-field=FIELD to request not to join a specific field,
can be passed multiple times
> and perhaps have the config file contain a customisable list of
> common non-foldable fields. Any suggestions?
Agreed. With the above command line options, basically the
configuration file will offer a predefined set of --no-join-field
arguments.
The main problem in implementing the configuration file part however,
because (at first look, I discovered only now that dctrl-tools have a
configuration file in the first place!) the current format seems
rather limited. How do you expect to specify the field list there?
A solution that can work is to generalize the format so that between
<executable name> and <default input file name> you are allowed to
pass command line options as you would do on the command line. That
can be tricky though, because the cmdline language of dctrl-tools is
complex and it is not entirely clear how to merge the options from the
conffile and those given by the user.
Alternatively, support for per-executable VARNAME=VALUE can be added
to the configuration file syntax, maybe with a convention mapping
variable names to command line options.
Any comments or better idea?
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