On Wed, 2009-11-11 at 16:37:15 +0100, Stefano Zacchiroli wrote:
> Package: dpkg-dev
> Version: 1.15.4.1
> Severity: wishlist
> File: /usr/bin/dpkg-gencontrol

> It would be nice to have support for a Description field in the source
> stanza of debian/control.

> 1) Various pieces of Debian infrastructure would benefit from
>    source package descriptions, a few examples:
>    - the PTS (currently lacking entirely per-source-package
>      descriptions)
>    - packages.d.o for its source pages
>    - DDPO (currently implementing a custom heuristic to map per-binary
>      descriptions to sources)

This would need picking a variable or set of variable names as the
supported source description field so that they get exported to the
.dsc, and from there percolate to the Sources files. Using Description
as the obvious name has the problem that, to be able to factorize for
usage in the binary packages, requires accessing the synopsis and body
parts independently, and that means either adding two magic variable
counter-parts or adding support for some kind of operator to split
the contents at substitution time.

Makeing those operators synopsis/body seems unsatisfactory because
these only make sense for multiline fields that, and dpkg-dev does
not currently have generic knowledge of which fields those apply to,
or even on what context.

So on account of this, I'm for now leaving this bug open.

> 2) A frequent pattern in debian/control is as follows:
> 
>     Package: a
>     Description: a is foo bar ...
>      Project src is .... (COMMON TEXT)
>      .
>      In this package you find a
> 
>     Package: b
>     Description: b is baz quux ...
>      Project src is .... (COMMON TEXT)
>      .
>      In this package you find b
> 
>   Source descriptions can be used to factoring out COMMON TEXT in a
>   single place.

This is now supported since dpkg 1.18.11, as part of the automatic
S:<source-field> substvars, (see deb-substvars(5) for more info, and
bglibs from experimental [C] for a current example of this usage).

  [C] <https://tracker.debian.org/media/packages/b/bglibs/control-2.03%2Bdfsg-2>

> I'm reporting this bug report against dpkg-dev because, AFAICT, it would
> be simply possible to implement this wishlist as an expansion done by
> dpkg-gencontrol at the end of the build. The expansion would simply copy
> the COMMON TEXT from the source package description (if any) at the
> beginning of each binary package description (possibly adding a
> paragraph separator "\n.\n").  I've no idea if such a naive
> implementation would have drawbacks elsewhere.

I don't think this is desriable, because it means it would not be
possible to control when not to have the common prefix inserted. And
we usually have the synopsis distinguished by some trailing text. So I
think the current substvar solution is supperior in that sense.

Thanks,
Guillem

Reply via email to