Repository navigation
Do not use the alternative Archive URL on PPM #623
Copy link
Copy link
Closed
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior
Description
Activity
- addedbugan unexpected problem or unintended behavioran unexpected problem or unintended behavior
on May 2, 2024 We only use it if the repo is called
CRAN, but that's not enough, because people sometimes use PPM with the nameCRAN.This needs to be fixed somewhere here: https://github.com/r-lib/pkgcache/blob/c227fe90b20959ac0d3f4e8a2897ed9117f70ee0/R/packages-gz.R#L311
Maybe we can filter based on the URL, e.g. if the URL contains__linux__. It should only matter on Linux, on other platforms we don't use theArchive.I'm slightly confused about how this workaround works, could you give a concrete example?
> options(repos = c(CRAN = "https://packagemanager.posit.co/cran/__linux__/jammy/latest")) > pak::pkg_install("hommel") ✔ Updated metadata database: 3.70 MB in 9 files. ✔ Updating metadata database ... done → Will install 1 package. → Will download 1 package with unknown size. + hommel 1.6 [dl] ℹ Getting 1 pkg with unknown size ✔ Got hommel 1.6 (x86_64-pc-linux-gnu-ubuntu-22.04) (11.43 kB) ✔ Downloaded 1 package (11.43 kB) in 1.3s Error: ! error in pak subprocess Caused by error in `verify_extracted_package(filename, pkg_cache)`: ! /tmp/RtmpZFurxM/file31416a7e1f/src/contrib/x86_64-pc-linux-gnu-ubuntu-22.04/4.4/hommel_1.6.tar.gz is not a valid binary, it is missing hommel/Meta/package.rds. Type .Last.error to see the more details.OTOH:
> options(repos = c(PPM = "https://packagemanager.posit.co/cran/__linux__/jammy/latest")) > pak::pkg_install("hommel") ✔ Updated metadata database: 4.79 MB in 4 files. ✔ Updating metadata database ... done → Will install 1 package. → Will download 1 package with unknown size. + hommel 1.6 [dl] ℹ Getting 1 pkg with unknown size ✔ Got hommel 1.6 (x86_64-pc-linux-gnu-ubuntu-22.04) (206.95 kB) ✔ Downloaded 1 package (206.95 kB) in 1.1s ✔ Installed hommel 1.6 (1s) ✔ 1 pkg + 1 dep: kept 1, added 1, dld 1 (206.95 kB) [10.9s]- added 2 commits that reference this issue
on May 3, 2024 This is now fixed in the nightly builds, install like this: https://pak.r-lib.org/reference/install.html#nightly-builds
- added a commit that references this issue
on Oct 21, 2024 - added a commit that references this issue
on May 11, 2026 - added a commit that references this issue
on May 13, 2026
Metadata
Metadata
Assignees
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior
Because sometimes PPM serves a source package there, while serving a binary at the proper URL:
pak only uses the alternative URL for a repo named 'CRAN', so a workaround is to name your repo something else, e.g. 'PPM' seems appropriate.