Il giorno mar 5 lug 2022 alle ore 09:58 Anna “CyberTailor” ha scritto: > On 2022-07-05 07:16, Robert Greener wrote: > > The current SRC_URI searches all the CRAN mirrors for > > /src/contrib/${PN}_${PV}.tar.gz. This is problematic. Once a package is > updated > > on CRAN, the package is removed from this path and moved to > > /src/contrib/Archive/${PN}/${PN}_${PV}.tar.gz. The effect of this is > > that once a package goes out-of-date on CRAN, the ebuild will no longer > > build. This significantly increases the maintenance burden of dev-R/* > > packages, as it requires that they be up-to-date at all times. > > > > The proposal here, is to use just the main CRAN, so that every mirror > > doesn't have to be searched, to search the main repo, and then the > > archive. (also, some CRAN mirrors seem misconfigured and return a html > > document if the package is not found at > > /src/contrib/${PN}_${PV}.tar.gz). This means that if the package is > > out-of-date it will still build. > > > > Signed-off-by: Robert Greener > > --- > > eclass/R-packages.eclass | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass > > index aed8cce84..dd6b69933 100644 > > --- a/eclass/R-packages.eclass > > +++ b/eclass/R-packages.eclass > > @@ -21,7 +21,10 @@ esac > > > > EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile > src_install pkg_postinst > > > > -SRC_URI="mirror://cran/src/contrib/${PN}_${PV}.tar.gz" > > +SRC_URI=" > > + https://cran.r-project.org/src/contrib/${PN}_${PV}.tar.gz > > + > https://cran.r-project.org/src/contrib/Archive/${PN}/${PN}_${PV}.tar.gz > > +" > > Multiple SRC_URI doesn't work as fallback. You need a custom src_fetch > function instead. > > I like this idea, any downsides?