Skip to content

Commit

Permalink
Skip base pkgs
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Aug 21, 2024
1 parent 602ee06 commit 1ef9331
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion rechecktools/R/ci.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ install_recheck_deps <- function(path = '.', which = 'strong'){
cranrepo <- getOption('repos')['CRAN']
cran <- utils::available.packages(repos = cranrepo)
crandeps <- tools::package_dependencies(pkg, db = cran, which = which, reverse = TRUE)[[pkg]]
packages <- unique(c(desc_deps(desc), crandeps))
packages <- setdiff(unique(c(desc_deps(desc), crandeps)), basepkgs())
if(grepl("Linux", Sys.info()[['sysname']])){
preinstall_linux_binaries(packages)
} else {
Expand All @@ -28,3 +28,9 @@ 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), ',')))))
}

# Do not try to install base packages
basepkgs <- function(){
c("R", rownames(installed.packages(priority="base")))
}

0 comments on commit 1ef9331

Please sign in to comment.