Windows binary `PACKAGES` index lists base-recommended packages with `Path:` entries whose directories don't exist (breaks pak/pkgcache installs)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Start by reading the reported URL construction in R/packages-gz.R near line 401 and trace how records with Path and no File are selected from the CRAN-like index. Reproduce with the provided pkgcache reprex for R 4.6 and compare the two Path rows with the working flat row. Done means installs no longer select a URL that returns 404, or the issue establishes whether the missing Recommended directories are expected.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I think this is more of a P3M/ PPM issue rather than pkgcache, but still worth noting if this needs a fix:
https://packagemanager.posit.co/cran/latest/bin/windows/contrib/4.6/PACKAGES has duplicate records for the 15 base-recommended packages (KernSmooth, MASS, Matrix, boot, class, cluster, codetools, foreign, lattice, mgcv, nlme, nnet, rpart, spatial, survival). Two of the duplicates carry Path: 4.6.2/Recommended and Path: 4.7.0/Recommended. Those directories and their PACKAGES files return 404, and the website shows no such binaries. On R 4.6.x, pak/pkgcache build the download URL from Path: and fail with a 404.
Index rows (foreign; MASS 7.3-66 is the same)
| Version | Depends |
Path |
URL works? |
|---|---|---|---|
| 0.8-92 | R (>= 4.7) |
4.7.0/Recommended |
No (ruled out by R version) |
| 0.8-92 | R (>= 4.6) |
4.6.2/Recommended |
404 |
| 0.8-92 | R (>= 4.0.0) |
none | 200 |
In the PPM Windows 4.6 index, 30 of 25,269 rows have a Path:. All 30 are these Recommended rows. CRAN's Windows 4.6 index has none.
Reprex (pkgcache 2.2.5, R 4.5.0 on Linux, so no Windows machine is needed)
library(pkgcache)
cmc <- cranlike_metadata_cache$new(
primary_path = tempfile(), replica_path = tempfile(),
platforms = "x86_64-w64-mingw32", r_version = "4.6", bioc = FALSE,
repos = c(PPM = "https://packagemanager.posit.co/cran/latest")
)
f <- cmc$list("foreign")
u <- unlist(f$sources)
sapply(u, function(x) curl::curl_fetch_memory(x, curl::new_handle(nobody = TRUE))$status_code)
Result:
.../contrib/4.6/4.7.0/Recommended/foreign_0.8-92.zip 404
.../contrib/4.6/4.6.2/Recommended/foreign_0.8-92.zip 404
.../contrib/4.6/foreign_0.8-92.zip 200
(pkgcache also adds the default CRAN mirror, which contributes a fourth row, foreign 0.8-91, that returns 200.)
Why it breaks installs
A record with Path: and no File: becomes <repo>/<Path>/<pkg>_<ver>.zip (pkgcache R/packages-gz.R, ~line 401). Nothing verifies the URL. pkgdepends drops the >= 4.7 row, but the >= 4.6 row passes on R 4.6.x and is used. I haven't traced why it is chosen over the equally valid flat row.
Timeline
4.7.0/Recommendedrows: present since at least 2026-05-01. Harmless on R < 4.7.4.6.2/Recommendedrows: first appear in the 2026-10-19 snapshot (14 packages), all 15 on 2026-10-20 andlatest.- Snapshots up to 2026-10-18 lack them, but carry older versions (e.g.
foreign0.8-91).
Expected: the index lists only records that resolve, or the Recommended directories are published.
Question: Are these per-R-version Recommended rows intentional, with the directories still to be published, or an index-generation error?
Workaround: pin to a snapshot dated 2026-10-18 or earlier, or install the recommended packages from CRAN source.
- Ngôn ngữ chính
- R
- Star
- 30
- Fork
- 19
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của r-lib/pkgcache
-
`pkgcache:::is_ppm_linux_repo_url()` does not recognize manylinux_2_28 as a valid binary distroĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
-
PPM and ARM images for LinuxĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 32/100
-
Improve extra CRAN metadataĐang mởupkeep
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
-
feature
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Tất cả issue của r-lib/pkgcache
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
hubverse-org/hubDevs#83 ·
-
data_bio2rarify - doc - dimensions wrongCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
leppott/BioMonTools#162 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
-
publications
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
epiforecasts/epiforecasts.github.io#161 ·
Maintainer thường phản hồi trong vòng 1 ngày