Removing archived CRAN packages before a build
Opened this issue · 0 comments
jwokaty commented
> Is there some process you used to figure out what dependencies were archived?
@jwokaty FWIW here is a little function you can use to find those CRAN packages that are installed on a builder but have vanished from CRAN:
find_vanished_CRAN_pkgs <- function(CRAN_repos="https://cran.r-project.org") {
inst_pkgs <- installed.packages()[ , "Package"]
is_cran <- sapply(inst_pkgs, function(pkg) "CRAN" %in% packageDescription(pkg)$Repository)
inst_cran_pkgs <- inst_pkgs[is_cran]
all_cran_pkgs <- available.packages(repos=CRAN_repos)[ , "Package"]
setdiff(inst_cran_pkgs, all_cran_pkgs)
}
Returns the following on nebbiolo1:
> find_vanished_CRAN_pkgs()
[1] "assertive.code" "assertive.data" "assertive.data.uk"
[4] "assertive.data.us" "assertive.datetimes" "assertive.properties"
[7] "assertive.strings" "assertive.types" "multipanelfigure"
[10] "optimr" "rbokeh" "Rcgmin"
[13] "Rvmmin"
We should probably think about having BBS automatically remove vanished packages (+ their rev deps) at the beginning of a run.
Originally posted by @hpages in #359 (comment)
Maybe there should also be some kind of notification that a CRAN package was removed so that we can evaluate the apt and pip dependencies.