[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: False positive lintian tag: requires-r-api



Hi Dylan,

On Wed, Jul 8, 2020 at 1:25 PM Dylan Aïssi <daissi@debian.org> wrote:
>
> >    E: r-cran-getoptlong: requires-r-api

I could not find that package in the archive. I used r-cran-getopt instead.

> This seems to be a false positive from lintian, this tag seems to be
> always emitted even when the binary package has correct dependencies

I can confirm.

> @Felix Do you know where the problem could be in this lintian check?

Yes. At least for the package r-cran-getopt, the package depends on
r-api-X.X, (4.0 for arch all) but the regular expression includes no
period (yet has a plus):

https://salsa.debian.org/lintian/lintian/-/blob/master/checks/languages/r/site-library.pm#L49

Everything works if I replace the plus with a period, as in:

      unless $depends->matches(qr/^r-api-[\d\w.]+$/, VISIT_OR_CLAUSE_FULL);

The package r-cran-getopt the no longer produces the false positive:

% frontend/lintian
/mirror/debian/pool/main/r/r-cran-getopt/r-cran-getopt_1.20.3-3_all.deb
P: r-cran-getopt: executable-in-usr-lib
usr/lib/R/site-library/getopt/exec/example.R
P: r-cran-getopt: repeated-path-segment R usr/lib/R/site-library/getopt/R/getopt
P: r-cran-getopt: repeated-path-segment R
usr/lib/R/site-library/getopt/R/getopt.rdb
P: r-cran-getopt: repeated-path-segment R
usr/lib/R/site-library/getopt/R/getopt.rdx

and the test still works, too:

debian/test-out/eval/checks/languages/r/site-library/lacks-depends-on-r-api/generic.t
.. ok

Please just let me know which characters you would like to allow. No MR needed.

Kind regards
Felix Lechner


Reply to: