diff options
author | Robert Greener <me@r0bert.dev> | 2022-07-06 13:21:41 +0100 |
---|---|---|
committer | Robert Greener <me@r0bert.dev> | 2022-07-12 13:05:31 +0100 |
commit | 4d1f8fd68327ea9eb6cf3ec4623dbfb0fc4d526c (patch) | |
tree | 5ccaac02d10ed2aa3275bee5934871d86a47b84f /eclass | |
parent | eclass/R-packages: Add CRAN_PN variable (diff) | |
download | guru-4d1f8fd68327ea9eb6cf3ec4623dbfb0fc4d526c.tar.gz guru-4d1f8fd68327ea9eb6cf3ec4623dbfb0fc4d526c.tar.bz2 guru-4d1f8fd68327ea9eb6cf3ec4623dbfb0fc4d526c.zip |
eclass/R-packages: Add CRAN_SNAPSHOT_DATE and use MRAN.
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 the snapshots of CRAN provided by
Microsoft. This requires an additional variable set in the ebuilds, the
update date. This can just be set to the date that the ebuild is
updated. By setting this, out of date packages will continue to build.
Signed-off-by: Robert Greener <me@r0bert.dev>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/R-packages.eclass | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass index 1665203d1..ec730a9a3 100644 --- a/eclass/R-packages.eclass +++ b/eclass/R-packages.eclass @@ -24,7 +24,15 @@ EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install pk CRAN_PV=${CRAN_PV:-$PV} CRAN_PN=${CRAN_PN:-${PN//_/.}} -SRC_URI="mirror://cran/src/contrib/${CRAN_PN}_${CRAN_PV}.tar.gz" +# Set CRAN_SNAPSHOT_DATE to the date the ebuild was updated in the ebuild + +if [[ ${CRAN_SNAPSHOT_DATE} ]]; then + SRC_URI="https://cran.microsoft.com/snapshot/${CRAN_SNAPSHOT_DATE}" +else + SRC_URI="mirror://cran" +fi +SRC_URI+="/src/contrib/${CRAN_PN}_${CRAN_PV}.tar.gz" + HOMEPAGE="https://cran.r-project.org/package=${CRAN_PN}" SLOT="0" |