update_PACKAGES {cranlike}R Documentation

Create or update PACKAGES* files for a CRAN-like repository


This function is similar to tools::write_PACKAGES(), with some differences:


  dir = ".",
  fields = NULL,
  type = c("source", "mac.binary", "win.binary"),
  xcolumns = NULL



Character vector describing the location of the repository (directory including source or binary packages) to generate the ‘PACKAGES’, ‘PACKAGES.gz’ and ‘PACKAGES.rds’ files from and write them to.


a character vector giving the fields to be used in the ‘PACKAGES’, ‘PACKAGES.gz’ and ‘PACKAGES.rds’ files in addition to the default ones, or NULL (default).

The default corresponds to the fields needed by available.packages: "Package", "Version", "Priority", "Depends", "Imports", "LinkingTo", "Suggests", "Enhances", "OS_type", "License" and "Archs", and those fields will always be included, plus the file name in field "File" if addFile = TRUE and the path to the subdirectory in field "Path" if subdirectories are used.


Type of packages: currently source ‘.tar.{gz,bz2,xz}’ archives, and macOS or Windows binary (‘.tgz’ or ‘.zip’, respectively) packages are supported. Defaults to "win.binary" on Windows and to "source" otherwise.


Extra scalar columns to add to the database. Should be a named list of character scalars or NULL for no extra columns.


update_PACKAGES uses a SQLite database to aid updating PACKAGES* files quickly. It this database does not exist, then it will be created based on the existing PACKAGES* files. If no PACKAGES* files exist, either, then these will be created via tools::write_PACKAGES().

See Also

Other PACKAGES manipulation: add_PACKAGES(), remove_PACKAGES()

[Package cranlike version 1.0.3 Index]