Github messages for voidlinux
 help / color / mirror / Atom feed
From: CameronNemo <CameronNemo@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] xbps-src: fetch from CRAN archive
Date: Wed, 03 Aug 2022 00:00:49 +0200	[thread overview]
Message-ID: <20220802220049.5IPnb4-wzveQGWyn7KSAU7QcMxZTToow4xHNIQPt--M@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-38438@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1914 bytes --]

There is an updated pull request by CameronNemo against master on the void-packages repository

https://github.com/CameronNemo/void-packages R-cran-archive
https://github.com/void-linux/void-packages/pull/38438

xbps-src: fetch from CRAN archive
CRAN has a lovely practice of moving the latest releases into an archive
after a new release is made. So when pillar 1.8.0 is released, for
example, version 1.7.0 gets moved into the archive.

Add some logic to fetch from the CRAN archive when this happens.

See below for an example:

```
=> R-cran-pillar-1.7.0_1: fetching distfile 'pillar_1.7.0.tar.gz'...
https://cran.r-project.org/src/contrib/pillar_1.7.0.tar.gz: Not Found
=> R-cran-pillar-1.7.0_1: fetching distfile 'pillar_1.7.0.tar.gz' (from CRAN archive)...
pillar_1.7.0.tar.gz: [517KB 0%] 19KB/s ETA: 00m00s
pillar_1.7.0.tar.gz: [517KB 25%] 201KB/s ETA: 00m02s
pillar_1.7.0.tar.gz: 517KB [avg rate: 788KB/s]
```

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/38438.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-R-cran-archive-38438.patch --]
[-- Type: text/x-diff, Size: 1420 bytes --]

From 268605b784496b3bc53966c507371125b387a878 Mon Sep 17 00:00:00 2001
From: Cameron Nemo <cnemo@tutanota.com>
Date: Tue, 2 Aug 2022 14:57:56 -0700
Subject: [PATCH] xbps-src: fetch from CRAN archive

CRAN has a lovely practice of moving the latest releases into an archive
after a new release is made. So when pillar 1.6.0 is released, for
example, version 1.5.1 gets moved into the archive.

Add the CRAN archive as a mirror to handle this case.

See below for an example:

=> R-cran-pillar-1.5.1_1: running do-fetch hook: 00-distfiles ...
=> R-cran-pillar-1.5.1_1: fetching distfile 'pillar_1.5.1.tar.gz' from 'https://cran.r-project.org/src/contrib/Archive/pillar'...
---
 common/environment/build-style/R-cran.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/common/environment/build-style/R-cran.sh b/common/environment/build-style/R-cran.sh
index ded66793396b..50c59277e7ba 100644
--- a/common/environment/build-style/R-cran.sh
+++ b/common/environment/build-style/R-cran.sh
@@ -5,4 +5,7 @@ wrksrc="${XBPS_BUILDDIR}/${pkgname#R-cran-}"
 # default to cran
 if [ -z "$distfiles" ]; then
 	distfiles="https://cran.r-project.org/src/contrib/${pkgname#R-cran-}_${version//r/-}.tar.gz"
+	# Old releases get put into archive, and removed from above location.
+	# Use the archive as a fallback to handle that case.
+	XBPS_DISTFILES_MIRROR+=" https://cran.r-project.org/src/contrib/Archive/${pkgname#R-cran-}"
 fi

  parent reply	other threads:[~2022-08-02 22:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-02 20:55 [PR PATCH] " CameronNemo
2022-08-02 21:43 ` Chocimier
2022-08-02 22:00 ` CameronNemo [this message]
2022-08-02 22:05 ` CameronNemo
2022-08-05 20:23 ` CameronNemo
2022-08-05 20:23 ` [PR PATCH] [Updated] " CameronNemo
2022-09-20 12:20 ` [PR PATCH] [Closed]: " CameronNemo

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=20220802220049.5IPnb4-wzveQGWyn7KSAU7QcMxZTToow4xHNIQPt--M@z \
    --to=cameronnemo@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /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;
as well as URLs for NNTP newsgroup(s).