Bug#930311: lintian: Possible exception to package-contains-documentation-outside-usr-share-doc

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug#930311: lintian: Possible exception to package-contains-documentation-outside-usr-share-doc

Niels Thykier
Package: lintian
Version: 2.15.0
Severity: normal

Hi,

I noticed that the dh-r package by default creates an override for
package-contains-documentation-outside-usr-share-doc when the R
package puts documentation in usr/lib/R/site-library:

"""
    my $check_for_docs = `find debian/$dh{FIRSTPACKAGE} -type f -name "*.md" -o -name "*.Rmd" -o -name "README" -o -name "README.md" | grep -v 'usr/share/doc'`;
    if ( $check_for_docs ) {
        say "Create lintian-override for package-contains-documentation-outside-usr-share-doc due to $check_for_docs";
        open(my $lintian, ">>", "debian/lintian-overrides");
        say $lintian "# The documentation is where it is expected by GNU R users";
        say $lintian "$dh{FIRSTPACKAGE}: package-contains-documentation-outside-usr-share-doc usr/lib/R/site-library/*";
        close $lintian;
    }
"""
(source: https://sources.debian.org/src/dh-r/20190121/dh/R.pm/?hl=3#L268)

My question is: Should we move this exception to lintian itself and
stop having people automate overrides or should something else be
done?  (To be explicit: The latter is an open question as I am not
sure what the "proper something else" would be in this case)

Thanks,
~Niels

Reply | Threaded
Open this post in threaded view
|

Bug#930311: lintian: Possible exception to package-contains-documentation-outside-usr-share-doc

Chris Lamb -2
Hi Niels,

> My question is: Should we move this exception to lintian itself and
> stop having people automate overrides

Oh, without any doubt here — the idea of automatically-generated
overrides simply makes me squirm.

(Shall we begin by cloning this bug "against" dh-r?)


Regards,

--
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      [hidden email] 🍥 chris-lamb.co.uk
       `-

Reply | Threaded
Open this post in threaded view
|

Bug#930311: lintian: Possible exception to package-contains-documentation-outside-usr-share-doc

Niels Thykier
Chris Lamb:

> Hi Niels,
>
>> My question is: Should we move this exception to lintian itself and
>> stop having people automate overrides
>
> Oh, without any doubt here — the idea of automatically-generated
> overrides simply makes me squirm.
>
> (Shall we begin by cloning this bug "against" dh-r?)
>
>
> Regards,
>

If we intend to create the exception in lintian, I would personally
probably go with making the exception first and then filing the bug
against dh-r to remove the auto-generation.  But either way works (for
me at least) and if you prefer the other order, then lets do that by all
means.

Thanks,
~Niels

Reply | Threaded
Open this post in threaded view
|

Bug#930311: lintian: Possible exception to package-contains-documentation-outside-usr-share-doc

Chris Lamb -2
Niels Thykier wrote:

> If we intend to create the exception in lintian, I would personally
> probably go with making the exception first and then filing the bug
> against dh-r to remove the auto-generation.

Good call. I've done the former task and filed the latter
as #930369.


Regards,

--
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      [hidden email] 🍥 chris-lamb.co.uk
       `-

Reply | Threaded
Open this post in threaded view
|

Bug#930311: lintian: Possible exception to package-contains-documentation-outside-usr-share-doc

Niels Thykier
In reply to this post by Chris Lamb -2
Chris Lamb:

> Hi Niels,
>
>> My question is: Should we move this exception to lintian itself and
>> stop having people automate overrides
>
> Oh, without any doubt here — the idea of automatically-generated
> overrides simply makes me squirm.
>
> (Shall we begin by cloning this bug "against" dh-r?)
>
>
> Regards,
>

Re:
https://salsa.debian.org/lintian/lintian/commit/a16cd3a1c812c8894bddf9b920561eb0dd602d85

I suspect we should probably match usr/lib/R/site-library/ as a prefix
rather than an exact match.  My guess is that they have a "per-package"
folder structure beneath that directory.

Thanks,
~Niels

Reply | Threaded
Open this post in threaded view
|

Bug#930311: lintian: Possible exception to package-contains-documentation-outside-usr-share-doc

Chris Lamb -2
Hi Niels,

> Re:
> https://salsa.debian.org/lintian/lintian/commit/a16cd3a1c812c8894bddf9b920561eb0dd602d85
>
> I suspect we should probably match usr/lib/R/site-library/ as a prefix
> rather than an exact match.

Whoops. Fixed in:

  https://salsa.debian.org/lintian/lintian/commit/3ced3d1b699f86726809043a4c3dd6c377593a35

Thanks for your review.


Best wishes,

--
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      [hidden email] 🍥 chris-lamb.co.uk
       `-