r-hub / containers

Docker containers for R-hub
https://r-hub.github.io/containers/
15 stars 4 forks source link

`r-check` in `rchk` container does not run #67

Open chainsawriot opened 4 months ago

chainsawriot commented 4 months ago

I followed the instruction here:

https://r-hub.github.io/containers/local.html

To run the rchk container locally and I think the do-check function in ther-check script inside the image is incomplete.

https://github.com/r-hub/containers/blob/0138fec2416feaf287b2026f9c7679323ce2d319/containers/rchk/r-check#L6-L18

My bash-fu is not the best. But this at least runs in an interactive session:

do_check () {
    pkg=${1}
    echo Checking "$pkg"
    (
        cd `dirname $pkg`
        R -q -e "pak::pkg_install('deps::$pkg', dependencies = list(direct = 'LinkingTo', indirect = 'hard'))"
        tar xzf $pkg
        topdir="`tar tzf $pkg | head -1`"
        #PACKAGE="`dirname $topdir`"
        #$topdir
        cd $checkdir/$topdir
        /opt/R/devel-rchk/bin/rchk.sh
    )
}

In summary

  1. pak::pkg_install lacks a closing paren.
  2. topdir is incorrectly defined
  3. I need to take a hackish approach to make the last cd work
  4. The path to rchk.sh is incorrect