diff --git a/DESCRIPTION b/DESCRIPTION index 36435eb6c..6f7b49a0f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -67,7 +67,7 @@ Config/needs/dependencies: filelock, jsonlite, pkgbuild, - pkgcache, + r-lib/pkgcache, r-lib/pkgdepends, pkgsearch, processx, diff --git a/NEWS.md b/NEWS.md index 470ce6359..d533d8737 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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 diff --git a/src/library/pkgcache/DESCRIPTION b/src/library/pkgcache/DESCRIPTION index 1240103eb..9c2104c61 100644 --- a/src/library/pkgcache/DESCRIPTION +++ b/src/library/pkgcache/DESCRIPTION @@ -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")) @@ -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 -Repository: CRAN -Date/Publication: 2024-04-04 06:33:02 UTC diff --git a/src/library/pkgcache/NEWS.md b/src/library/pkgcache/NEWS.md index 1dd2452e2..71beb0e96 100644 --- a/src/library/pkgcache/NEWS.md +++ b/src/library/pkgcache/NEWS.md @@ -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 diff --git a/src/library/pkgcache/R/packages-gz.R b/src/library/pkgcache/R/packages-gz.R index b74067adb..1b9cc26c9 100644 --- a/src/library/pkgcache/R/packages-gz.R +++ b/src/library/pkgcache/R/packages-gz.R @@ -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)