update_PACKAGES {cranlike} | R Documentation |
Create or update PACKAGES* files for a CRAN-like repository
Description
This function is similar to tools::write_PACKAGES()
, with some
differences:
It always uses the
MD5sum
field.It defaults to
addFiles = TRUE
, to allow following the package files better.It does not support the
verbose
,unpacked
, andsubdirs
arguments currently.It uses a database to speed up the indexing process, and only reindexes files that have added, removed or updated.
Usage
update_PACKAGES(
dir = ".",
fields = NULL,
type = c("source", "mac.binary", "win.binary"),
xcolumns = NULL
)
Arguments
dir |
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. |
fields |
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 The default corresponds to
the fields needed by |
type |
Type of packages: currently source ‘.tar.{gz,bz2,xz}’ archives,
and macOS or Windows binary (‘.tgz’ or ‘.zip’,
respectively) packages are supported. Defaults to
|
xcolumns |
Extra scalar columns to add to the database.
Should be a named list of character scalars or |
Details
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()