diff --git a/NEWS.md b/NEWS.md index ef25d9d97..f16531d3c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,9 @@ # renv (development version) +* `renv` now assumes that Artifactory package repositories will use a CRAN-like + layout of packages for packages in the archive. (#1996) + * `renv` now includes compiled extensions on Linux + macOS. These extensions are primarily used to improve the performance of `renv::dependencies()` and other static analysis code. diff --git a/R/retrieve.R b/R/retrieve.R index 20a303713..891f8367a 100644 --- a/R/retrieve.R +++ b/R/retrieve.R @@ -953,8 +953,9 @@ renv_retrieve_repos_archive_formatter <- function(url) { with(record, file.path(repo, "src/contrib/Archive", Package)) }, - # format used by Artifactory + # format used by older releases of Artifactory # https://github.com/rstudio/renv/issues/602 + # https://github.com/rstudio/renv/issues/1996 artifactory = function(repo, record) { with(record, file.path(repo, "src/contrib/Archive", Package, Version)) }, @@ -981,7 +982,7 @@ renv_retrieve_repos_archive_formatter <- function(url) { # use the headers to infer the repository type if ("x-artifactory-id" %in% names(headers)) { - formatters[["artifactory"]] + formatters[["cran"]] } else if (grepl("Nexus", headers[["server"]] %||% "")) { formatters[["nexus"]] } else {