Dear list, I'm trying to get some details from repositories with available.packages. However, despite being included on the DESCRIPTION files they are not available.
ap <- utils::available.packages(fields = "Additional_repositories", filters = c("CRAN", "duplicates"), ignore_repo_cache = TRUE, repos = "https://cran.r-project.org") ap[, "Additional_repositories"] |> is.na() |> all() ## [1] TRUE However, some packages like Seurat have the Additional_repositories field [2]. If I try with another repository (Bioconductor software repository): ap <- available.packages(fields = "biocViews", ignore_repo_cache = TRUE, repos = "https://bioconductor.org/packages/3.21/bioc") ap[, "biocViews"] |> is.na() |> all() ## [1] TRUE It also misses the BiocViews field compulsory on that repository. Both repositories use tools::write_PACKAGES [3][4] to generate the file read by available.packages. This function writes by default fields "needed by available.packages". However, it is unclear what is needed for available.packages. According to its documentation, it returns "details corresponding to packages currently available at one or more repositories". To me this would mean that fields on the DESCRIPTION files should appear, but the default of write_PACKAGES doesn't write other fields besides '"Package"', '"Version"', '"Priority"', '"Depends"', '"Imports"', '"LinkingTo"', '"Suggests"', '"Enhances"', '"OS_type"', '"License"' and '"Archs"'. I could approach each repository and ask to include more fields. However, to match the documentation on available.packages and help all repository administrators it would make sense to change the default on write_PACKAGES. Could the default fields be changed, so that all fields available on packages' DESCRIPTION to PACKAGES(.gz,.rds). Perhaps with fields = TRUE? If this is too much it would be great if fields documented by Writing R Extensions are written on PACKAGES. This modification would make it easier for all to reuse repository data. Many thanks for your consideration, Lluís PD: From CRAN perspective CRAN_packages_db() function can be used to get Additional_repositories, but this is limited to CRAN and won't work for BiocViews on Bioconductor or for other arbitrary fields like '"RoxygenNote"'. [1]: https://stat.ethz.ch/pipermail/r-devel/2024-June/083477.html [2]: https://cran.r-project.org/package=Seurat [3]: https://svn.r-project.org/R-dev-web/trunk/CRAN/QA/Uwe/make/writeCRANPackages.R [4]: https://github.com/Bioconductor/BBS/blob/devel/utils/makePropagationStatusDb.R#L348 ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel