Skip to content

Commit b57b135

Browse files
authored
Merge pull request #868 from r-lib/lib-can-be-vector
2 parents 6921f24 + a7845e2 commit b57b135

2 files changed

Lines changed: 15 additions & 6 deletions

File tree

R/lockfile.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
#' for caching systems.
1616
#'
1717
#' @param lockfile Path to the lock file.
18+
#' @param lib Character vector of library paths, or `NULL`. Used when
19+
#' resolving package dependencies: packages already installed in any of
20+
#' these paths are considered satisfied. If `NULL` (the default), an
21+
#' empty temporary library is used, so all dependencies are resolved
22+
#' from scratch regardless of what is currently installed.
1823
#' @inheritParams pkg_install
1924
#'
2025
#' @family lock files

R/package.R

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@
1212
#' - `.`: package in the current working directory.
1313
#'
1414
#' See "[Package sources]" for more details.
15-
#' @param lib Package library to install the packages to. Note that _all_
16-
#' dependent packages will be installed here, even if they are
17-
#' already installed in another library. The only exceptions are base
18-
#' and recommended packages installed in `.Library`. These are not
19-
#' duplicated in `lib`, unless a newer version of a recommended package
20-
#' is needed.
15+
#' @param lib Character vector of library paths to consider when creating the
16+
#' installation plan.
17+
#' - The first library path is the target where packages will be installed.
18+
#' - Additional library paths, if provided, are visible to the solver as
19+
#' candidates for satisfying dependency requirements. If a needed package is
20+
#' found here at an acceptable version, it won't be re-installed in
21+
#' `lib[1]`.
22+
#' - Base and recommended packages in `.Library` are always considered, i.e.
23+
#' a recommended package is only duplicated in `lib[1]` if a newer version
24+
#' is required.
2125
#' @param upgrade When `FALSE`, the default, pak does the minimum amount
2226
#' of work to give you the latest version(s) of `pkg`. It will only upgrade
2327
#' dependent packages if `pkg`, or one of their dependencies explicitly

0 commit comments

Comments
 (0)