From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5DB5D158094 for ; Tue, 12 Jul 2022 12:06:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8D1BBE0F75; Tue, 12 Jul 2022 12:06:38 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CF196E0C24 for ; Tue, 12 Jul 2022 12:06:37 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B3AD1340C8D for ; Tue, 12 Jul 2022 12:06:36 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1BBD652D for ; Tue, 12 Jul 2022 12:06:35 +0000 (UTC) From: "Robert Greener" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robert Greener" Message-ID: <1657627531.4d1f8fd68327ea9eb6cf3ec4623dbfb0fc4d526c.me@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: eclass/ X-VCS-Repository: repo/proj/guru X-VCS-Files: eclass/R-packages.eclass X-VCS-Directories: eclass/ X-VCS-Committer: me X-VCS-Committer-Name: Robert Greener X-VCS-Revision: 4d1f8fd68327ea9eb6cf3ec4623dbfb0fc4d526c X-VCS-Branch: dev Date: Tue, 12 Jul 2022 12:06:35 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: cea4d260-6fc5-4766-9836-a67649819660 X-Archives-Hash: 4b40cfdba416fa21c73d84d21bf073bc commit: 4d1f8fd68327ea9eb6cf3ec4623dbfb0fc4d526c Author: Robert Greener r0bert dev> AuthorDate: Wed Jul 6 12:21:41 2022 +0000 Commit: Robert Greener r0bert dev> CommitDate: Tue Jul 12 12:05:31 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=4d1f8fd6 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 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..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"