Repository navigation
Closed
Description
Originally raised as: r-universe-org/help#58
Compare these results:
> pak::pkg_install("bookdown")
v Loading global cached package metadata ... done
> Will update 1 package.
> Will download 1 package with unknown size.
+ bookdown 0.22 > 0.22.2 [dl]
? Do you want to continue (Y/n) Y
i Getting 1 pkg with unknown size
x Failed to download bookdown 0.22.2 (windows)
x Failed to download 1 package.
Error: Failed to download bookdown from `https://rstudio.r-universe.dev/bin/windows/contrib/4.0/bookdown_0.22.2.zip`.
Type .Last.error.trace to see where the error occurred
> install.packages('bookdown', repos = 'https://rstudio.r-universe.dev')
Installing package into 'C:/Users/msmcbain/libs/R'
(as 'lib' is unspecified)
trying URL 'https://rstudio.r-universe.dev/bin/windows/contrib/4.0/bookdown_0.22.3.zip'
Content type 'application/zip' length 1093613 bytes (1.0 MB)
downloaded 1.0 MB
package 'bookdown' successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\msmcbain\AppData\Local\Temp\Rtmp8uLg0e\downloaded_packages
For some reason pak is trying to download the zip file for the previous build (0.22.2) rather than latest (0.22.3)?
My repos config looks like this:
options(
repos =
c(
CRAN = "https://cran.rstudio.com",
rstudiopm = "https://packagemanager.rstudio.com/all/latest",
ropensci = "https://ropensci.r-universe.dev",
rlib = "https://r-lib.r-universe.dev",
rstudio = "https://rstudio.r-universe.dev",
tidyverse = "https://tidyverse.r-universe.dev"
)
)
Metadata
Metadata
Assignees
Labels
No labels
Activity
MilesMcBain commentedon May 27, 2021
Note that some packages in the universe seem to work. I also had the same issue with
htmltools.gaborcsardi commentedon May 27, 2021
You probably need to update the metadata cache:
jeroen commentedon May 27, 2021
I have temporarily disabled caching of the
PACKAGESfile, until I figure out the proper solution. @MilesMcBain can you confirm the problem is now gone?MilesMcBain commentedon May 27, 2021
Yep it seems to find the right zip file now. 👍
gaborcsardi commentedon May 28, 2021
@jeroen The web server could also emit a standard header to tell pak (pkgcache) not to cache the metadata. (If it doesn't already.)
jeroen commentedon May 28, 2021
I specifically wrote it so that it does do that, I think it is useful ;) But I understand now where the bug is. When a package in the database is updated to a new version, the creation timestamp of the original record is not changed, and I was using that as the etag. So I just need to fix that
gaborcsardi commentedon May 28, 2021
Right, there is a
Cache-Control: no-cachethere indeed. I'll need to update pkgcache to take that into account.gaborcsardi commentedon May 28, 2021
Will be better with r-lib/pkgcache#63