dep4deb: Download package dependencies

View source: R/dep4deb.R

dep4debR Documentation

Download package dependencies

Description

Tries to fetch all (missing) R packages to successfully build a Debian package. The packages are downloaded in source format for you to debianize, but dep4deb can try to check for available Debian packages instead.

Usage

dep4deb(
  pck.source.dir,
  pck.name = NULL,
  destdir = file.path(tempdir(), "roxyPackge", "downloads"),
  repos = getOption("repos"),
  all = FALSE,
  check.deb = TRUE,
  origin = "cran",
  origin.alt = list(),
  available = NULL
)

Arguments

pck.source.dir

Character string, path pointing to the root directory of your package sources, to a local R package source tarball, or a full URL to such a package tarball. Tarballs will be downloaded to destdir, if needed, extracted, and then checked for dependencies. Will be ignored if pck.name is not NULL.

pck.name

Character string, the package name. This is an alternative to using pck.source.dir.

destdir

File path to the directory where all downloaded files should be saved to.

repos

Character vector, the base URL(s) of the repositories to use (see download.packages).

all

Logical, if FALSE only currently missing packages are downloaded, where "missing" means that there is no Debian package if these packages installed. If TRUE and check.deb=FALSE, all dependencies will be downloaded.

check.deb

Logical, TRUE it will be checked if a debian package can be found, and if that is the case, its name is added to the results and the download skipped. If all=FALSE, packages will only be listed in the results if they are not installed.

origin

A character string for the package origin, see debianize.

origin.alt

A named list for more complex origin configuration, see debianize.

available

An object as returned by available.packages listing packages available at the repositories, or NULL which makes an internal call to available.packages.

Details

The function works its way recursively through the dependencies of the dependencies, beginning with the original package given. To make it easier for you to debianize the downloaded packages in a proper order, all downloads will be stored in numbered subfolders of the main download folder, and you should work from the highest number backwards.

Value

Returns a list with two elements:

dl

A matrix as returned by download.packages, listing all downloaded sources

deb

A character vector naming already available Debian packages

Examples

## Not run: 
dep4deb(pck.name="roxyPackage")

## End(Not run)

unDocUMeantIt/roxyPackage documentation built on March 9, 2023, 6:31 p.m.