From: "Ludovic Courtès" <ludo@gnu.org>
To: Arun Isaac <arunisaac@systemreboot.net>
Cc: 33801@debbugs.gnu.org
Subject: [bug#33801] import: github: Support source URIs that redirect to GitHub
Date: Wed, 19 Dec 2018 22:47:00 +0100 [thread overview]
Message-ID: <87d0pxtciz.fsf@gnu.org> (raw)
In-Reply-To: <cu7imzpokxn.fsf@systemreboot.net> (Arun Isaac's message of "Wed, 19 Dec 2018 16:14:20 +0530")
Hi,
Arun Isaac <arunisaac@systemreboot.net> 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 <arunisaac@systemreboot.net>
> 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’.
next prev parent reply other threads:[~2018-12-19 21:48 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-19 10:44 [bug#33801] import: github: Support source URIs that redirect to GitHub Arun Isaac
2018-12-19 21:47 ` Ludovic Courtès [this message]
2018-12-20 6:56 ` Arun Isaac
2018-12-20 10:55 ` Ludovic Courtès
2018-12-20 11:20 ` Arun Isaac
2018-12-20 11:22 ` Ludovic Courtès
2018-12-20 13:07 ` Arun Isaac
2018-12-20 16:28 ` Ludovic Courtès
2018-12-20 16:48 ` Arun Isaac
2018-12-21 12:27 ` Arun Isaac
2018-12-21 15:18 ` Ludovic Courtès
2018-12-22 10:08 ` Arun Isaac
2018-12-23 17:23 ` Ludovic Courtès
2019-01-05 23:18 ` Ludovic Courtès
2019-01-07 17:48 ` Arun Isaac
2019-01-08 8:40 ` Ludovic Courtès
2019-01-08 13:19 ` Arun Isaac
2019-01-09 14:11 ` bug#33801: " Ludovic Courtès
2019-01-10 7:45 ` [bug#33801] " Arun Isaac
2019-01-10 8:52 ` Ludovic Courtès
2019-01-10 10:12 ` Arun Isaac
2018-12-21 0:12 ` Eric Bavier
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=87d0pxtciz.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=33801@debbugs.gnu.org \
--cc=arunisaac@systemreboot.net \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.