99# ' also check reverse suggests.
1010# ' @param preinstall_dependencies start by installing dependencies for all
1111# ' packages to be checked.
12- recheck <- function (sourcepkg , which = " strong" , preinstall_dependencies = TRUE ){
13- # Some temporary settings
14- oldrepos <- enable_all_repos()
15- oldtimeout <- options(timeout = 600 )
16- on.exit(options(c(oldrepos , oldtimeout )), add = TRUE )
17-
12+ recheck <- function (sourcepkg , which = " strong" , check_bioc = FALSE , preinstall_dependencies = TRUE ){
1813 # Get the tarball
1914 if (grepl(' ^https:' , sourcepkg )){
2015 curl :: curl_download(sourcepkg , basename(sourcepkg ))
@@ -26,18 +21,17 @@ recheck <- function(sourcepkg, which = "strong", preinstall_dependencies = TRUE)
2621 }
2722 pkg <- sub(" _.*" , " " , basename(sourcepkg ))
2823 checkdir <- dirname(sourcepkg )
29- cranrepo <- getOption(' repos' )[' CRAN' ] #
30- cran <- utils :: available.packages(repos = cranrepo )
31- packages <- c(pkg , tools :: package_dependencies(pkg , db = cran , which = which , reverse = TRUE )[[pkg ]])
24+ repos <- c(
25+ CRAN = ' https://cloud.r-project.org' ,
26+ BIOC = if (isTRUE(check_bioc )) ' https://bioconductor.posit.co/packages/devel/bioc'
27+ )
28+ db <- utils :: available.packages(repos = repos )
29+ packages <- c(pkg , tools :: package_dependencies(pkg , db = db , which = which , reverse = TRUE )[[pkg ]])
3230 if (preinstall_dependencies ){
3331 group_output(" Preparing dependencies" , {
34- if (grepl(" Linux" , Sys.info()[[' sysname' ]])){
35- preinstall_linux_binaries(packages )
36- } else {
37- utils :: install.packages(packages , dependencies = TRUE )
38- deps <- unique(unlist(unname(tools :: package_dependencies(packages , recursive = TRUE ))))
39- update.packages(oldPkgs = deps , ask = FALSE )
40- }
32+ utils :: install.packages(packages , dependencies = TRUE )
33+ deps <- unique(unlist(unname(tools :: package_dependencies(packages , recursive = TRUE ))))
34+ update.packages(oldPkgs = deps , ask = FALSE )
4135 })
4236 }
4337 check_args <- character ()
0 commit comments