The backfill decided which objects were worth inspecting by looking the package up in CRAN's current index. CRAN lists only what it currently ships, so a package it has archived is absent, is never recognised as compiled, and is never inspected. No verdict is ever recorded for it. `union_index_records()` meanwhile reads the slot's *own* `NeedsCompilation`, finds `yes`, and drops the record when the source classifier flags the package and no safe verdict exists to clear it. The repair cannot rescue it either, because it works from recorded verdicts and there is no row. The record is therefore dropped from every per-minor index on every re-index, permanently. `mixedMem` and `vcpen`, both removed from CRAN, were stuck out of all three rhel8 per-minor indexes on both architectures that way, surviving a backfill, two re-indexes and a repair. Read `NeedsCompilation` from the slot's own flat index instead, which describes exactly the objects being inspected. It is fetched from the bucket rather than over HTTPS because this runs inside R, where the edge would route the request to a per-minor index. Keyed on `<package>_<version>` rather than the package name: a slot can carry several versions and only some of them compile.
79 lines
1.7 KiB
R
79 lines
1.7 KiB
R
library(future)
|
|
future::plan(multisession)
|
|
future::plan(sequential)
|
|
time <- Sys.time()
|
|
files <- s3fs::s3_dir_ls(
|
|
sprintf(
|
|
"devxy-r-package-binaries-hel1/arm64/rhel9/latest/src/contrib/Archive"
|
|
),
|
|
recurse = T
|
|
)
|
|
Sys.time() - time
|
|
|
|
|
|
archive <- llply(dirs, function(dir) {
|
|
files <- list.files(
|
|
dir,
|
|
recursive = FALSE,
|
|
full.names = TRUE,
|
|
pattern = "*.tar.gz"
|
|
)
|
|
if (length(files) == 0) {
|
|
print(paste0("Error: Empty directory: ", dir))
|
|
return(NULL)
|
|
}
|
|
info <- file.info(files)
|
|
|
|
tryCatch(
|
|
{
|
|
rownames(info) <- paste0(basename(dirname(files)), "/", basename(files))
|
|
},
|
|
error = function(e) {
|
|
print(paste0("Error: Exception catched for Archived directory: ", dir))
|
|
print(e)
|
|
return(NULL)
|
|
}
|
|
)
|
|
|
|
info
|
|
})
|
|
|
|
tryCatch(
|
|
{
|
|
rownames(info) <- paste0(basename(dirname(files)), "/", basename(files))
|
|
},
|
|
error = function(e) {
|
|
print(paste0("Error: Exception catched for Archived directory: ", dir))
|
|
print(e)
|
|
return(NULL)
|
|
}
|
|
)
|
|
|
|
|
|
curl::curl_download(
|
|
"https://cran.devxy.io/amd64/rhel9/latest/src/contrib/PACKAGES.db",
|
|
"PACKAGES.db"
|
|
)
|
|
con <- DBI::dbConnect(RSQLite::SQLite(), "PACKAGES.db")
|
|
df <- DBI::dbReadTable(con, "packages")
|
|
|
|
cranlike:::write_packages_files("/tmp", "PACKAGES.db")
|
|
|
|
# check
|
|
which(grepl("digest", df$Package))
|
|
which(grepl("digest", df$Package))
|
|
|
|
system("cat /tmp/PACKAGES | grep '^Package: digest' | wc -l")
|
|
|
|
|
|
curl::curl_fetch_memory(
|
|
"https://cloud.r-project.org/src/contrib/Meta/archive.rds"
|
|
)
|
|
remotes <- readRDS(url(
|
|
"https://cloud.r-project.org/src/contrib/Meta/archive.rds",
|
|
"rb"
|
|
))
|
|
packages <- readRDS(url(
|
|
"https://cran.devxy.io/arm64/noble/latest/src/contrib/PACKAGES.rds",
|
|
"rb"
|
|
))
|