Skip to content

Commit

Permalink
inherit original repository (#1111)
Browse files Browse the repository at this point in the history
fixes #1110
  • Loading branch information
aronatkins authored Oct 24, 2024
1 parent 666bb37 commit f8059ee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
end-of-file extensions. Previously, a file with `.R` elsewhere in its name,
such as `.Rprofile`, was incorrectly considered. (#1106)

* Use the repository name identified by renv when `available.packages()` does
not enumerate the package, which occurs for archived packages. (#1110)

* Remove remaining directory layout validation check. (#1102)

* Use the public Connect server API endpoint `/v1/tasks/{id}` to poll task
Expand Down
7 changes: 7 additions & 0 deletions R/bundlePackageRenv.R
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,15 @@ standardizeRenvPackage <- function(pkg,
} else {
# $Repository comes from DESCRIPTION and is set by repo, so can be
# anything. So we must look up from the package name
originalRepository <- pkg$Repository
pkg$Repository <- findRepoUrl(pkg$Package, availablePackages)
pkg$Source <- findRepoName(pkg$Repository, repos)
if (is.na(pkg$Source)) {
# Archived packages are not publicized by available.packages(). Use
# the renv.lock repository as source, expecting that the package is
# available through one of the repository URLs.
pkg$Source <- originalRepository
}
}
} else if (pkg$Source == "Bioconductor") {
pkg$Repository <- findRepoUrl(pkg$Package, availablePackages)
Expand Down

0 comments on commit f8059ee

Please sign in to comment.