From: Robert Greener <me@r0bert.dev>
To: gentoo-guru@lists.gentoo.org
Cc: Robert Greener <me@r0bert.dev>, cyber@sysrq.in, lssndrbarbieri@gmail.com
Subject: [gentoo-guru] [RFC PATCH v2 3/4] eclass/R-packages: Add CRAN_UPD_DATE and use MRAN.
Date: Wed, 6 Jul 2022 13:21:41 +0100 [thread overview]
Message-ID: <20220706122142.125975-4-me@r0bert.dev> (raw)
In-Reply-To: <20220706122142.125975-1-me@r0bert.dev>
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>
---
eclass/R-packages.eclass | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
index 1665203d1..74f175540 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_UPD_DATE to the date the ebuild was updated in the ebuild
+
+if [[ ${CRAN_UPD_DATE} ]]; then
+ SRC_URI="https://cran.microsoft.com/snapshot/${CRAN_UPD_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"
--
2.35.1
next prev parent reply other threads:[~2024-11-24 22:47 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220705071539.2463760-1-me@r0bert.dev>
2022-07-05 7:16 ` [gentoo-guru] [RFC PATCH 2/3] eclass/R-packages: substitute _ with . in SRC_URI and HOMEPAGE Robert Greener
2022-07-06 0:49 ` Anna “CyberTailor”
2022-07-05 7:16 ` [gentoo-guru] [RFC PATCH 1/3] eclass/R-packages: Use src/contrib or src/contrib/Archive from main CRAN Robert Greener
2022-07-05 7:58 ` Anna “CyberTailor”
2022-07-07 7:17 ` Alessandro Barbieri
2022-07-08 13:09 ` Robert Greener
2022-07-05 7:16 ` [gentoo-guru] [RFC PATCH 3/3] eclass/R-packages: Add CRAN_PV Robert Greener
2022-07-06 12:21 ` [gentoo-guru] [RFC PATCH v2 0/4] eclass/R-packages: improvements Robert Greener
2022-07-06 12:21 ` [gentoo-guru] [RFC PATCH v2 1/4] eclass/R-packages: Add CRAN_PV Robert Greener
2022-07-11 5:04 ` [gentoo-guru] " Alessandro Barbieri
2022-07-06 12:21 ` [gentoo-guru] [RFC PATCH v2 2/4] eclass/R-packages: Add CRAN_PN variable Robert Greener
2022-07-06 12:21 ` Robert Greener [this message]
2022-07-06 12:21 ` [gentoo-guru] [RFC PATCH v2 4/4] eclass/R-packages: Add Robert Greener (myself) as author Robert Greener
2022-07-06 12:32 ` [gentoo-guru] [RFC PATCH v2 0/4] eclass/R-packages: improvements Anna “CyberTailor”
2022-07-11 5:06 ` [gentoo-guru] " Alessandro Barbieri
2022-07-12 12:06 ` Robert Greener
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220706122142.125975-4-me@r0bert.dev \
--to=me@r0bert.dev \
--cc=cyber@sysrq.in \
--cc=gentoo-guru@lists.gentoo.org \
--cc=lssndrbarbieri@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox