[please keep me and the bug in cc]

Hi,

during the effort to reproduce Debian binary packages distributed via deb.debian.org (see https://reproduce.debian.net) it turned out that many/most/all R package couldn't be reproduced as some Depends/Suggests/Recommends where missing.

After digging it bit - the missing build-dependency on apt was unfortunately just a red herring - it turns out, the problem is that check_real_version_of_package() in dh/R.pm[1] uses 'grep-aptavail' and thus the result depends on the state of the apt cache. As parse_depends() (in dh/R.pm) calls check_real_version_of_package() to build Depends/Suggests/Recommend they depend on the status of the apt cache as well.

While this seems to be a quite elegant solution to the problem of mapping R package names to Debian package names, it turns out to be quite hard to reproduce the state of the apt cache for a given point in time.

Jochen reminded me of the solution dh-python chose [2] for that problem and I do think a (simplified) version of that would work for R packages as well.

The main idea is to have a mapping table embedded in dh-r which can be overrode on package level.

mapping table would basically be

<R package name> <corresponding Debian package name>
knitr r-cran-knir
ggplot2 r-cran-ggplot2
reshape2 r-cran-reshape2
...

containing a mapping for all packages in Debian unstable at the time of the dh-r upload.

This would of course mean that we'd need to keep that list moderately updated in the dh-r package.

As we can't guarantee that, we need the possibility to place a file in debian/ to amend/override the mapping table dh-r provides. (We could of course have a helper script creates that file for us.)


I'm quite sure, I miss some details here and I do entirely miss the context of why the current approach was chosen, but I hope, we can start a discussion on how to make it possible to reproduce R packages going forward.

Best
Philip


[1] https://salsa.debian.org/r-pkg-team/dh-r/-/blob/5d6dc04ba4f1f1b5db4bfaecc0e00893e46e5c72/dh/R.pm#L147-L170

[2] https://salsa.debian.org/python-team/tools/dh-python/-/blob/master/pydist/README.PyDist

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to