Description
Description
R package managers expects the newest package URL to be available at the base path and all older versions to be available in a specific /Archive/package path of the package registry.
Currently Gitea CRAN support for R packages stores all packages in the base path, causing R package manager to not being able to find older versions of packages.
Example:
I upload two versions of my R package "giteaR" to Gitea under an Organization called "R-packages", version 1.0.0 and 1.0.1, these are now available at:
https://gitea.url/api/packages/R-packages/cran/src/contrib/giteaR_1.0.0.tar.gz
https://gitea.url/api/packages/R-packages/cran/src/contrib/giteaR_1.0.1.tar.gz
However my R package manager (either base, renv or packrat) expects them to be located at:
https://gitea.url/api/packages/R-packages/cran/src/contrib/Archive/giteaR/giteaR_1.0.0.tar.gz
https://gitea.url/api/packages/R-packages/cran/src/contrib/giteaR_1.0.1.tar.gz
The same structure is visible in the official R CRAN respository.
Example for the ggplot2 package:
Newest (as of this issue report): https://cran.r-project.org/src/contrib/ggplot2_3.5.1.tar.gz
Version before that: https://cran.r-project.org/src/contrib/Archive/ggplot2/ggplot2_3.5.0.tar.gz
The above is only true for source package builds and not for binaries. CRAN doesn't keep binaries for older versions of packages nor does it keep them for Archived packages.
Suggested solution is to keep the current Gitea behavior as-is and add a new Get router which adds support for the /Archive/package path.
Gitea Version
1.21
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
We are running Gitea via a systemd service on Ubuntu
Database
None