diff --git a/rechecktools/R/ci.R b/rechecktools/R/ci.R index 3579216..eba52d8 100644 --- a/rechecktools/R/ci.R +++ b/rechecktools/R/ci.R @@ -13,7 +13,8 @@ install_recheck_deps <- function(path = '.', which = 'strong'){ pkg <- desc[[1, 'Package']] cranrepo <- getOption('repos')['CRAN'] cran <- utils::available.packages(repos = cranrepo) - packages <- c(pkg, tools::package_dependencies(pkg, db = cran, which = which, reverse = TRUE)[[pkg]]) + crandeps <- tools::package_dependencies(pkg, db = cran, which = which, reverse = TRUE)[[pkg]] + packages <- unique(c(desc_deps(desc), crandeps)) if(grepl("Linux", Sys.info()[['sysname']])){ preinstall_linux_binaries(packages) } else { @@ -22,3 +23,8 @@ install_recheck_deps <- function(path = '.', which = 'strong'){ update.packages(oldPkgs = deps, ask = FALSE) } } + +desc_deps <- function(desc){ + deps <- c(desc$Package, desc$Depends, desc$Imports, desc$LinkingTo, desc$Suggests, desc$Enhances) + unique(trimws(sub("\\(.*\\)", "", unlist(strsplit(as.character(deps), ','))))) +}