kalibera / rchk

102 stars 10 forks source link

Container always checking CRAN version instead of local tarball #25

Closed jeroen closed 3 years ago

jeroen commented 3 years ago

Hi, thank you for the container, it is very useful.

I am trying to debug gert, however I noticed that the container seems to be checking the CRAN version, even when I specify a local path. For example:

git clone https://github.com/r-lib/gert
R CMD build gert
docker run -v "`pwd`:/workspace" kalibera/rchk --install-deb "libgit2-dev" "/workspace/gert_1.0.9000.tar.gz"

Output indicates that gert_1.0.9000.tar.gz was found, yet it proceeds with installing gert_1.0.2.tar.gz from CRAN:

...
Setting up libgit2-dev:amd64 (0.28.4+dfsg.1-2) ...
Processing triggers for libc-bin (2.31-0ubuntu9.1) ...
source("/rchk/scripts/utils.r"); install_package_libs("/workspace/gert_1.0.9000.tar.gz")
trying URL 'https://cran.r-project.org/src/contrib/gert_1.0.2.tar.gz'
Content type 'application/x-gzip' length 61324 bytes (59 KB)
==================================================
downloaded 59 KB

* installing *source* package 'gert' ...
** package 'gert' successfully unpacked and MD5 sums checked
...

And the results also reflect the CRAN version of the package. Am I doing something wrong?

kalibera commented 3 years ago

Thanks for the report, this was a bug, should be fixed now. The docker image is rebuilt already and the singularity should be shortly.

Note that rchk container will re-use previously built R packages it finds in '/rchk/packages', e.g. when you mount '-v pwd/packages:/rchk/packages', and it is ok to have the tarball there as well as in the documentation. Mounting somewhere else, e.g. "/workspace" is fine, but R packages will be rebuilt every time you invoke the container.