[R-pkg-team] Bug#1042406: dh-r: throws "Use of uninitialized value $dep_line in substitution" warnings with some packages

Andreas Tille andreas at an3as.eu
Fri Jul 28 05:41:10 BST 2023


Am Fri, Jul 28, 2023 at 08:07:01AM +0530 schrieb Nilesh Patra:
> 
> 
> On 28 July 2023 1:37:23 am IST, Andreas Tille <andreas at an3as.eu> wrote:
> >> The reason that we don't see such problems in for instance
> >> r-bioc-bsgenome is because it has some values in the testdepends and
> >> recommendsinput ends up having some value[4].
> >> 
> >> I have attached a patch to fix this, please check.
> >
> >While reading the patch it definitely fixes the uninitialized value.
> >However, it does not fulfill the intended behaviour to add the
> >Test-Depends as Recommends.  I'm considering parsing DESCRIPTION
> >directly to do so.
> 
> I am not sure if I understand this. The behaviour of dh-r for adding recommends with and without the patch is exactly the same, i.e. there's no regression afaics.

Yes.
 
> If you're saying that relying on d/t/control for testdeps is suboptimal, then that's a different problem.

Yes.  But the problem was caused by the switch from d/t/control to
d/t/autopkgtest-pkg-r.conf and thus it exclusively happens in r-bioc-*
packages (in r-cran-* packages this did not happen).
 
> However IMHO adding test dependencies as recommends is not a good idea at all and I was surprised to see it while reading the code. While I can agree that adding them as recommends can help users run tests, I think the subset of people who actually would be interested in doing so is less. Recommends are installed by default by apt and so this ends up cluttering users system with un-needed stuff.

I think it was a good idea as long as we provided
/usr/share/doc/r-*/{run-unit-test,README.test} since the installed
codebase was fitting the docs that users can test the package on their
local machine.  Since also these docs were not installed any more it
makes sense to drop the Recommends which means your patch is solving
the problem.

> That said, I maybe missing the history of this decision here.
> 
> What do you think?

I think this is a good point to discuss adding Test-Depends as
Recommends on the mailing list.  However, I'm currently a bit offlineish
and will not be actively involved into this discussion (which is fine for
me).

Thanks a lot for bringing this up

    Andreas. 

-- 
http://fam-tille.de



More information about the R-pkg-team mailing list