new_pkg_installation_plan {pkgdepends}R Documentation

R6 class for installation from a lock file

Description

An installation plan is similar to an installation proposal (i.e. pkg_installation_proposal), but it already contains the solved dependencies, complete with download URLs.

Usage

new_pkg_installation_plan(lockfile = "pkg.lock", config = list(), ...)

Arguments

lockfile

Path to the lock file to use.

config

Configuration options, a named list. See 'Configuration'. If it does not include library, then .libPaths()[1] is added as library.

...

Additional arguments, passed to pkg_installation_plan$new().

Details

Typically you create a pkg_installation_plan object with new_pkg_installation_plan() and then call its ⁠$download()⁠ method to download the packages and then its ⁠$install()⁠ method to install them.

Value

new_pkg_installation_plan() returns a pkg_installation_plan object.

Super class

pkgdepends::pkg_installation_proposal -> pkg_installation_plan

Methods

Public methods

Inherited methods

Method new()

Create a new pkg_installation_plan object. Consider using new_pkg_installation_plan() instead of calling the constructor directly.

The returned object can be used to download and install packages, according to the plan.

Usage
pkg_installation_plan$new(
  lockfile = "pkg.lock",
  config = list(),
  remote_types = NULL
)
Arguments
lockfile

Path to the lock file to use.

config

Configuration options. See 'Configuration'. It needs to include the package library to install to, in library.

remote_types

Custom remote ref types, this is for advanced use, and experimental currently.


Method resolve()

This function is implemented for installation plans, and will error.

Usage
pkg_installation_plan$resolve()

Method async_resolve()

This function is implemented for installation plans, and will error.

Usage
pkg_installation_plan$async_resolve()

Method get_solve_policy()

Installation plans are already solved, and this method will return NA_character_, always.

Usage
pkg_installation_plan$get_solve_policy()

Method set_solve_policy()

This function is implemented for installation plans, and will error.

Usage
pkg_installation_plan$set_solve_policy()

Method solve()

This function is implemented for installation plans, and will error.

Usage
pkg_installation_plan$solve()

Method update()

Update the plan to the current state of the library. If the library has not changed since the plan was created, then it does nothing. If new packages have been installed, then it might not be necessary to download and install all packages in the plan.

Usage
pkg_installation_plan$update()
Details

This operation is different than creating a new proposal with the updated library, because it uses the the packages and package versions of the original plan. E.g. if the library has a newer version of a package, then ⁠$update()⁠ will downgrade it to the version in the plan.


Method update_sysreqs()

Update information about installed and missing system requirements.

Usage
pkg_installation_plan$update_sysreqs()

Method format()

Format a pkg_installation_plan object, typically for printing.

Usage
pkg_installation_plan$format(...)
Arguments
...

not used currently.

Returns

A character vector, each element should be a line in the printout.


Method clone()

The objects of this class are cloneable with this method.

Usage
pkg_installation_plan$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


[Package pkgdepends version 0.7.2 Index]