Skip to content

Commit

Permalink
Use dev pkgcache
Browse files Browse the repository at this point in the history
For #623.
  • Loading branch information
gaborcsardi committed May 3, 2024
1 parent 3bf2da5 commit d791187
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 6 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Config/needs/dependencies:
filelock,
jsonlite,
pkgbuild,
pkgcache,
r-lib/pkgcache,
r-lib/pkgdepends,
pkgsearch,
processx,
Expand Down
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# pak (development version)

* The metadata cache now does not use source URLs for packages in `Archive`
on Posit Package Manager repositories. This URLs may serve a different
package, even a source package when the main URL for the same package
serves a binary package. The alternative URLs are not needed on PPM,
anyway, because PPM is in a consistent state w.r.t. metadata and
package files (#623).

# pak 0.7.2

* pak now supports using parameters for all packages with the
Expand Down
7 changes: 3 additions & 4 deletions src/library/pkgcache/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: pkgcache
Title: Cache 'CRAN'-Like Metadata and R Packages
Version: 2.2.2
Version: 2.2.2.9000
Authors@R: c(
person("Gábor", "Csárdi", , "csardi.gabor@gmail.com", role = c("aut", "cre")),
person("Posit Software, PBC", role = c("cph", "fnd"))
Expand All @@ -22,11 +22,10 @@ Config/Needs/website: tidyverse/tidytemplate
Config/testthat/edition: 3
Encoding: UTF-8
Language: en-US
Roxygen: list(markdown = TRUE, r6 = FALSE)
RoxygenNote: 7.3.1.9000
NeedsCompilation: yes
Packaged: 2024-04-04 06:07:27 UTC; gaborcsardi
Packaged: 2024-05-03 09:58:15 UTC; gaborcsardi
Author: Gábor Csárdi [aut, cre],
Posit Software, PBC [cph, fnd]
Maintainer: Gábor Csárdi <csardi.gabor@gmail.com>
Repository: CRAN
Date/Publication: 2024-04-04 06:33:02 UTC
9 changes: 9 additions & 0 deletions src/library/pkgcache/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# pkgcache (development version)

* The metadata cache now does not use source URLs for packages in `Archive`
on Posit Package Manager repositories. This URLs may serve a different
package, even a source package when the main URL for the same package
serves a binary package. The alternative URLs are not needed on PPM,
anyway, because PPM is in a consistent state w.r.t. metadata and
package files (https://github.com/r-lib/pak/issues/623).

# pkgcache 2.2.2

* pkgcache now treats R 4.5.x (current R-devel) macOS binaries
Expand Down
7 changes: 6 additions & 1 deletion src/library/pkgcache/R/packages-gz.R
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,13 @@ packages_make_sources <- function(mirror, platform, target, repodir,
# We don't use Archive for recommended packages, until this is
# fixed in RSPM: https://github.com/rstudio/package-manager/issues/10471
# To work around: https://github.com/r-lib/pak/issues/467

# We also don't use it on PPM (Linux), because PPM might serve a source
# package on Archive, or a different binary build:
# https://github.com/r-lib/pak/issues/623
recommended <- package %in% recommended_packages()
cransrc <- type == "cran" & platform == "source" & !recommended
ppm <- grepl("__linux__", url)
cransrc <- type == "cran" & platform == "source" & !recommended & !ppm
result[cransrc] <- zip_vecs(url[cransrc], url2[cransrc])

others <- vlapply(result, is.null)
Expand Down

0 comments on commit d791187

Please sign in to comment.