• Bug#1063709: lintian: should recommend gobject-introspection for dh --w

    From Simon McVittie@21:1/5 to All on Sun Feb 11 14:50:01 2024
    Package: lintian
    Version: 2.117.0
    Severity: normal

    For context, ostree_2024.1-1 runs "dh $@ --with=gir" in d/rules.

    `lintian -Ii ostree_2024.1-1.dsc` reports:

    E: ostree source: missing-build-dependency-for-dh-addon gir (does not satisfy gobject-introspection-bin:any) [debian/rules]

    However, the gobject-introspection-bin package is an implementation
    detail, and is not meant to be relied on. Packages that depend on the gir
    addon should depend on either dh-sequence-gir or gobject-introspection
    (which, behind the scenes, depends on gobject-introspection-bin), and
    ostree correctly depends on gobject-introspection. I don't think this
    is an uncommon pattern.

    I don't know how best to avoid this in Lintian - I see that it's doing
    the equivalent of
    `apt-file search /usr/share/perl5/Debian/Debhelper/Sequence/gir.pm`
    in order to generate data/debhelper/add_ons.json. Perhaps lib/Lintian/Data/Debhelper/Addons.pm could learn to have a hand-maintained
    list of special cases, "if you would generate a dependency on package x,
    use package y instead", and add
    gobject-introspection-bin => gobject-introspection to that list?

    I could work around this by moving gir.pm to gobject-introspection and
    asking the lintian maintainers to regenerate add_ons.json; but if I
    did that, it would be duplicated in the archive, once per architecture,
    which doesn't seem ideal.

    data/debhelper/commands.json also mentions gobject-introspection-bin,
    therefore whatever part of Lintian reads that file will have the same
    problem.

    Thanks,
    smcv

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon McVittie@21:1/5 to Simon McVittie on Sun Feb 11 16:10:01 2024
    Control: forwarded -1 https://salsa.debian.org/lintian/lintian/-/merge_requests/492
    Control: tags -1 + patch

    On Sun, 11 Feb 2024 at 13:44:27 +0000, Simon McVittie wrote:
    `lintian -Ii ostree_2024.1-1.dsc` reports:

    E: ostree source: missing-build-dependency-for-dh-addon gir (does not satisfy gobject-introspection-bin:any) [debian/rules]
    ...
    Perhaps
    lib/Lintian/Data/Debhelper/Addons.pm could learn to have a hand-maintained list of special cases, "if you would generate a dependency on package x,
    use package y instead", and add
    gobject-introspection-bin => gobject-introspection to that list?

    In fact that list already exists. Fix proposed in https://salsa.debian.org/lintian/lintian/-/merge_requests/492

    smcv

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