From 7be857d5349d0656ce3389584482e7a23185e195 Mon Sep 17 00:00:00 2001 From: Florian Angerer <florian.angerer@oracle.com> Date: Mon, 11 Dec 2017 12:21:53 +0100 Subject: [PATCH] Ignore recommended packages for caching. --- .../r/install.cache.R | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/com.oracle.truffle.r.test.packages/r/install.cache.R b/com.oracle.truffle.r.test.packages/r/install.cache.R index 17f8f91faf..d74eb390f1 100644 --- a/com.oracle.truffle.r.test.packages/r/install.cache.R +++ b/com.oracle.truffle.r.test.packages/r/install.cache.R @@ -21,6 +21,11 @@ # questions. # +# A simple log function; to be replaced by a used of this file. +log.message <- function(..., level=0) { + cat(..., "\n") +} + pkg.cache.install <- function(pkg.cache.env, pkgname, lib.install, install.cmd) { is.cached <- pkg.cache.get(pkg.cache.env, pkgname, lib.install) if (!is.cached) { @@ -243,10 +248,6 @@ pkg.cache.get.version <- function(cache.dir, cache.version, table.file.name, cac }) } -log.message <- function(..., level=0) { - cat(..., "\n") -} - # list of recommended and base packages recommended.base.packages <- c("boot", "class", "cluster", "codetools", "foreign", "KernSmooth", "lattice", "MASS", "Matrix", "mgcv", "nlme", "nnet", "rpart", "spatial", "survival", "base", "compiler", "datasets", "grDevices", "graphics", "grid", "methods", "parallel", "splines", "stats", "stats4", "tools", "utils") @@ -254,12 +255,11 @@ recommended.base.packages <- c("boot", "class", "cluster", "codetools", "foreign base.packages <- c("base", "compiler", "datasets", "grDevices", "graphics", "grid", "methods", "parallel", "splines", "stats", "stats4", "tools", "utils") # the list of packages that will be excluded in the transitive dependecies -ignored.packages <- base.packages +ignored.packages <- recommended.base.packages package.dependencies <- function(pkg, lib, dependencies = c("Depends", "Imports", "LinkingTo"), pl = available.packages()) { if (!(pkg %in% rownames(pl))) { - # TODO: logging - cat("Package", pkg, "not on CRAN\n") + log.message("Package", pkg, "not on CRAN\n", level=1) return (NULL) } fields <- pl[pkg, dependencies] -- GitLab