Skip to content

Commit

Permalink
Use use_bioconductor configuration option when creating cache in `R…
Browse files Browse the repository at this point in the history
…/cache.R` Fix r-lib#295
  • Loading branch information
meztez authored Sep 25, 2024
1 parent 78e40fa commit a5cf318
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# pak (development version)

* Use `use_bioconductor` configuration option when creating cache in `R/cache.R` (https://github.com/r-lib/pak/issues/295, @meztez).

# pak 0.8.0

* `pkg_deps()` now accepts a vector of package names.
Expand Down
12 changes: 8 additions & 4 deletions R/cache.R
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ meta_summary_internal <- function() {
cmc <- pkgcache::cranlike_metadata_cache$new(
platforms = pkgdepends::current_config()$get("platforms"),
cran_mirror = pkgdepends::current_config()$get("cran_mirror"),
r_version = pkgdepends::current_config()$get("r_versions")
r_version = pkgdepends::current_config()$get("r_versions"),
bioc = pkgdepends::current_config()$get("use_bioconductor")
)
ret <- cmc$summary()
list(
Expand Down Expand Up @@ -207,7 +208,8 @@ meta_list_internal <- function(pkg) {
cmc <- pkgcache::cranlike_metadata_cache$new(
platforms = pkgdepends::current_config()$get("platforms"),
cran_mirror = pkgdepends::current_config()$get("cran_mirror"),
r_version = pkgdepends::current_config()$get("r_versions")
r_version = pkgdepends::current_config()$get("r_versions"),
bioc = pkgdepends::current_config()$get("use_bioconductor")
)
cmc$list(packages = pkg)
}
Expand Down Expand Up @@ -241,7 +243,8 @@ meta_update_internal <- function() {
cmc <- pkgcache::cranlike_metadata_cache$new(
platforms = pkgdepends::current_config()$get("platforms"),
cran_mirror = pkgdepends::current_config()$get("cran_mirror"),
r_version = pkgdepends::current_config()$get("r_versions")
r_version = pkgdepends::current_config()$get("r_versions"),
bioc = pkgdepends::current_config()$get("use_bioconductor")
)
cmc$update()
invisible()
Expand Down Expand Up @@ -284,7 +287,8 @@ meta_clean_internal <- function() {
cmc <- pkgcache::cranlike_metadata_cache$new(
platforms = pkgdepends::current_config()$get("platforms"),
cran_mirror = pkgdepends::current_config()$get("cran_mirror"),
r_version = pkgdepends::current_config()$get("r_versions")
r_version = pkgdepends::current_config()$get("r_versions"),
bioc = pkgdepends::current_config()$get("use_bioconductor")
)
cmc$cleanup(force = TRUE)
}

0 comments on commit a5cf318

Please sign in to comment.