• Bug#874206: debian-policy: allow a trailing comma in package relationsh

    From Mattia Rizzolo@21:1/5 to All on Mon Sep 4 11:10:03 2017
    XPost: linux.debian.bugs.dist

    Package: debian-policy
    Version: 3.9.8

    I use the `wrap-and-sort` tool to keep my list of dependencies neatly
    sorted and wrapped. In particular, I use the `-t` flag to have a
    trailing comma at the end of the list. For example

    Build-Depends:
    foo,
    bar,
    Homepage: …

    There, notice how there is a comma after "bar", the last item of the
    list.

    I've heard several people in several forums assert that such syntax is
    totally undocumented, despite being accepted by all tools I know of.
    Indeed, policy doesn't explicitly allow (but AFAIK neither disallow)
    such syntax. Nonetheless, I'd prefer if some tweaks could be done to
    the policy to stop these annoying comments :)

    I think such stuff belongs to § 7.1 "Syntax of relationship fields", but
    I can't really image what to write and where.



    FTR, this bug was triggered by <https://bugs.debian.org/760021#20>.

    --
    regards,
    Mattia Rizzolo

    GPG Key: 66AE 2B4A FCCF 3F52 DA18 4D18 4B04 3FCD B944 4540 .''`.
    more about me: https://mapreri.org : :' : Launchpad user: https://launchpad.net/~mapreri `. `'`
    Debian QA page: https://qa.debian.org/developer.php?login=mattia `-

    -----BEGIN PGP SIGNATURE-----

    iQIzBAEBCgAdFiEEi3hoeGwz5cZMTQpICBa54Yx2K60FAlmtCN8ACgkQCBa54Yx2 K63png//VrityvHB0gkt8XY6T7BMJ7hGrfCJtu/SuawMEB7LbDWHAVGNiFXoUc4j Xiw+mSCSfsJlUCv7aOPrqi9cQwPQSHgv/0zcTTewRbzlOgTy4WxlO8la2SDkRxK3 pdyWtiWWSrDJXA7IR1ZbrQIH0T/WaTiPdJoOxmkZZ3TyWAiXGO08rb2VvPDbYuE9 cL2XzLREMrUhwN1sn7XXqYxLdrK5YaCESdJ1okP2zsDeRYIZl2V2Jo/xvLd5QRvj 15gxIqqaFl+fw8ETIyN9RGRs9kaBk+YKQfWmn1lYLRfrd7cN91eykNVuIod2MlrZ 8PBNNxJEMcRezwPceuhkuE6aCVznftL1UiZ0Mo7LzKfkpkVZcXn0RC+B8FMD2K8a eUgnYu6En1ob6V0sC1hfTqsH1Ym6udjLa6JmC0Qic/jzLUn+4N8N32mgUobU3jNR 7vhUYV0AbSUjZBHp8Xh8syeb48akOjZ273KhLTgoQUFLle+N3wRjiP/SOo6X7Cko JuiXd6OvWus328mTps0ucW39T84np/nO3fjYZYVX8wprJNExvny
  • From Josh Triplett@21:1/5 to mattia@debian.org on Tue Sep 5 20:40:01 2017
    XPost: linux.debian.bugs.dist

    On Mon, 4 Sep 2017 10:03:47 +0200 Mattia Rizzolo <mattia@debian.org> wrote:
    Package: debian-policy
    Version: 3.9.8

    I use the `wrap-and-sort` tool to keep my list of dependencies neatly
    sorted and wrapped. In particular, I use the `-t` flag to have a
    trailing comma at the end of the list. For example

    Build-Depends:
    foo,
    bar,
    Homepage: …

    There, notice how there is a comma after "bar", the last item of the
    list.

    I've heard several people in several forums assert that such syntax is totally undocumented, despite being accepted by all tools I know of.

    I didn't even know this syntax was allowed, and now that I do I'd love
    to use it.

    Do you know how long this has worked, in apt and dpkg?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Russ Allbery@21:1/5 to Andrey Rahmatullin on Thu Sep 7 01:00:01 2017
    XPost: linux.debian.bugs.dist

    Andrey Rahmatullin <wrar@debian.org> writes:
    On Wed, Sep 06, 2017 at 08:55:45AM +0200, Mattia Rizzolo wrote:

    No idea about apt, but dpkg's maintainer told me (shortly after having
    filed this bug) that dpkg supported it basically since ever; quoting
    him:

    <guillem> mapreri: the trailing comma syntax *must* be supported,
    otherwise things like «foo, ${substvar}» with an empty
    substvar would break havoc
    <guillem> mapreri: well dpkg does not accept it but the perl code does
    and remove it before generating the DEBIAN/control files so
    it's all good
    <guillem> mapreri: I'll clarify the deb-src-control man page

    So the syntax is supported in source control files but not in the binary ones?

    Yeah, I think that's the right interpretation. (Probably not in *.dsc
    files either.) That means that it doesn't matter if tools that operate
    only on the archive support it, since they won't see it; only package
    building tools that operate on debian/control need to support it, and they
    all seem to. (wrap-and-sort -t adds the trailing commas and is very
    widely used, so if this didn't work, I think we'd know by now.)

    --
    Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mattia Rizzolo@21:1/5 to Josh Triplett on Wed Sep 6 10:00:02 2017
    XPost: linux.debian.bugs.dist

    On Tue, Sep 05, 2017 at 10:28:37AM -0700, Josh Triplett wrote:
    I didn't even know this syntax was allowed, and now that I do I'd love
    to use it.

    Happy to have confirmation that some clarity is needed :)

    Do you know how long this has worked, in apt and dpkg?

    No idea about apt, but dpkg's maintainer told me (shortly after having
    filed this bug) that dpkg supported it basically since ever; quoting
    him:

    <guillem> mapreri: the trailing comma syntax *must* be supported,
    otherwise things like «foo, ${substvar}» with an empty
    substvar would break havoc
    <guillem> mapreri: well dpkg does not accept it but the perl code does
    and remove it before generating the DEBIAN/control files so
    it's all good
    <guillem> mapreri: I'll clarify the deb-src-control man page

    --
    regards,
    Mattia Rizzolo

    GPG Key: 66AE 2B4A FCCF 3F52 DA18 4D18 4B04 3FCD B944 4540 .''`.
    more about me: https://mapreri.org : :' : Launchpad user: https://launchpad.net/~mapreri `. `'`
    Debian QA page: https://qa.debian.org/developer.php?login=mattia `-

    -----BEGIN PGP SIGNATURE-----

    iQIzBAEBCgAdFiEEi3hoeGwz5cZMTQpICBa54Yx2K60FAlmvm+0ACgkQCBa54Yx2 K62aPRAAlfCwAHIL+NaWhvNLQwem4RAiYKpGhw+yzZce5WKDEHcqj9fVWcl7BYzl j4p/ZWosWewU0uDbk2H4a9JMO1Ad0IXgGcPf/Hl5BUWBy3kRNHAUyGnkb8XGF3Lv RjX465TA10J4sFnQKE6+Nf81YtwiSIMqEuNG6GUiIIyuxqUUbBUlf1yGgVnThdgl gLge33jUHqM+Efz6YE7Qq4IUr0Ui2giGXWBPATOwNf0TGCBWDK3Mmj74Ruya7vyT /CrE4RtZS2lhobWN6Udz9Z6POY4n8KVdY3ZjA+vq/f+hIfqhXdnbWIjOpwVGCSZa 1EhliUmLfq+uhzHV2PlBoZi6yM9MdeLWFgeDy4svRfDD3kbSCvGoLk/060hU9gym Dbq8VbOnRL0Y2BVgNkv1ylTcSt221+4mwLWEXdmEKC7RqNsIr9mnwbsjrv0I4HZD tmtuKBqPJIBCpq/zmuH2eaqzsys/7SWcSWlD4WkZF78F/JJj5/ej60zDzyOTd8T7 Xm8xFzn6eE2j6M8M1/OuplaACSRN1g9xZLzrqxGYpBQCU3WPIe2
  • From Bill Allombert@21:1/5 to Russ Allbery on Thu Sep 7 16:00:01 2017
    XPost: linux.debian.bugs.dist

    On Wed, Sep 06, 2017 at 02:51:34PM -0700, Russ Allbery wrote:
    Andrey Rahmatullin <wrar@debian.org> writes:
    On Wed, Sep 06, 2017 at 08:55:45AM +0200, Mattia Rizzolo wrote:

    No idea about apt, but dpkg's maintainer told me (shortly after having
    filed this bug) that dpkg supported it basically since ever; quoting
    him:

    <guillem> mapreri: the trailing comma syntax *must* be supported,
    otherwise things like «foo, ${substvar}» with an empty
    substvar would break havoc
    <guillem> mapreri: well dpkg does not accept it but the perl code does
    and remove it before generating the DEBIAN/control files so
    it's all good
    <guillem> mapreri: I'll clarify the deb-src-control man page

    So the syntax is supported in source control files but not in the binary ones?

    Maybe a better way to say that is that it is only supported in
    debian/control, and not in files generated from it, including .dsc.

    We already had this discussion in another bug report.

    Cheers,
    --
    Bill. <ballombe@debian.org>

    Imagine a large red swirl here.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)