[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#33801] import: github: Support source URIs that redirect to GitHub
From: |
Ludovic Courtès |
Subject: |
[bug#33801] import: github: Support source URIs that redirect to GitHub |
Date: |
Wed, 19 Dec 2018 22:47:00 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Hi,
Arun Isaac <address@hidden> skribis:
> Many GitHub hosted packages (for example, youtube-dl) present source
> tarballs for download on their website
> (https://yt-dl.org/downloads/latest/youtube-dl-2018.12.17.tar.gz). But
> these URIs just redirect to GitHub. Currently, our GitHub refresher
> does not cover these packages. This patch addresses that.
Good idea! Do you know how many packages fall into that category?
> From 90f756fd6f7df50236023e120cb040f6e5d1718c Mon Sep 17 00:00:00 2001
> From: Arun Isaac <address@hidden>
> Date: Wed, 19 Dec 2018 15:59:52 +0530
> Subject: [PATCH] import: github: Support source URIs that redirect to GitHub.
>
> * guix/import/github.scm (follow-redirects-to-github): New function.
> (updated-github-url)[updated-url]: For source URIs on other domains, replace
> all instances of the old version with the new version.
> (latest-release)[origin-github-uri]: If necessary, follow redirects to find
> the GitHub URI.
[...]
> +(define (follow-redirects-to-github uri)
> + "Follow redirects of URI until a GitHub URI is found. Return that GitHub
> +URI. If no GitHub URI is found, return #f."
Perhaps add the yt-dl.org example as a comment here.
> + (define (follow-redirect uri)
> + (receive (response body) (http-get uri #:streaming? #t)
Add: (close-port body).
Otherwise LGTM, thanks!
Ludo’.
- [bug#33801] import: github: Support source URIs that redirect to GitHub, Arun Isaac, 2018/12/19
- [bug#33801] import: github: Support source URIs that redirect to GitHub,
Ludovic Courtès <=
- [bug#33801] import: github: Support source URIs that redirect to GitHub, Arun Isaac, 2018/12/20
- [bug#33801] import: github: Support source URIs that redirect to GitHub, Ludovic Courtès, 2018/12/20
- [bug#33801] import: github: Support source URIs that redirect to GitHub, Arun Isaac, 2018/12/20
- [bug#33801] import: github: Support source URIs that redirect to GitHub, Ludovic Courtès, 2018/12/20
- [bug#33801] import: github: Support source URIs that redirect to GitHub, Arun Isaac, 2018/12/20
- [bug#33801] import: github: Support source URIs that redirect to GitHub, Ludovic Courtès, 2018/12/20
- [bug#33801] import: github: Support source URIs that redirect to GitHub, Arun Isaac, 2018/12/20
- [bug#33801] import: github: Support source URIs that redirect to GitHub, Arun Isaac, 2018/12/21
- [bug#33801] import: github: Support source URIs that redirect to GitHub, Ludovic Courtès, 2018/12/21
- [bug#33801] import: github: Support source URIs that redirect to GitHub, Arun Isaac, 2018/12/22