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

Stefano Zacchiroli zack at debian.org
Thu Jan 29 13:19:31 UTC 2009

Package: dctrl-tools
Version: 2.13.1
Severity: wishlist

Now that multi-line 822 fields in debian/control-s are allowed and are
becoming widespread, I was looking for a tool to do 822-aware greps in
my packages.

In fact, can use grep-dctrl for that, e.g.:

  zack at usha:~/pkg-ocaml-maint/packages/git/ocamlnet$ grep-dctrl -s build-depends -F build-depends '' debian/control 
  build-depends: debhelper (>> 5.0.0), dpatch, cdbs,
   ocaml-nox (>= 3.10.0-9), camlp5 (>= 4.08),
   libpcre-ocaml-dev (>= 5.11.1),
   libcryptgps-ocaml-dev, libssl-ocaml-dev,
   apache2-mpm-worker, apache2-prefork-dev

Unfortunately, as long as the output is multi-line, it's harder than
needed to further process the grepped data.

Given that multi-line splitting is content-preserving in 822, how
about "joining" by default the above lines before outputting? (Note
that the join cannot be a dump join, or a simple "| tr '\n' ' '",
because an extra space per continuation line should be removed as

Given that the grepped data is 822 anyhow, such join would be
semantically meaningful and should not harm.

I offer to write a patch for this, but I'm doubtful about the
following 3 possibilities (reported in my personal order of

1) always join
2) join by default, offer flag to avoid joining
3) do not join by default, offer flag to join


-- System Information:
Debian Release: 5.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages dctrl-tools depends on:
ii  libc6                         2.7-18     GNU C Library: Shared libraries

dctrl-tools recommends no packages.

Versions of packages dctrl-tools suggests:
ii  apt                    Advanced front-end for dpkg
ii  debtags                       1.7.9      Enables support for package tags

-- no debconf information

More information about the Dctrl-tools-devel mailing list