unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Arun Isaac <arunisaac@systemreboot.net>
To: Efraim Flashner <efraim@flashner.co.il>
Cc: 34144@debbugs.gnu.org, bavier@member.fsf.org
Subject: bug#34144: guix import github crash
Date: Mon, 21 Jan 2019 00:11:56 +0530	[thread overview]
Message-ID: <cu7bm4bw4qz.fsf@systemreboot.net> (raw)
In-Reply-To: <20190120093206.GA15839@macbook41>


[-- Attachment #1.1: Type: text/plain, Size: 62 bytes --]


I've attached a patch addressing this issue. May I push it?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-import-github-Check-if-git-URIs-are-GitHub-URIs.patch --]
[-- Type: text/x-patch, Size: 1306 bytes --]

From 57fa15ef15d1fdb0896ce139e1e02c459b285743 Mon Sep 17 00:00:00 2001
From: Arun Isaac <arunisaac@systemreboot.net>
Date: Sun, 20 Jan 2019 22:18:32 +0530
Subject: [PATCH] import: github: Check if git URIs are GitHub URIs.

This fixes a regression introduced in 9a5091d0c181453d0f31ce97f96a4e577a25e796
whereby packages with git origin URIs not hosted on GitHub would be wrongly
detected as being covered under the github updater.
Reported by Efraim Flashner <efraim@flashner.co.il>.

* guix/import/github.scm (updated-github-url): Check if git URIs are GitHub
URIs.
---
 guix/import/github.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/guix/import/github.scm b/guix/import/github.scm
index b287313d98..e17ef0b840 100644
--- a/guix/import/github.scm
+++ b/guix/import/github.scm
@@ -98,7 +98,9 @@ false if none is recognized"
               (updated-url source-uri))
              ((source-uri ...)
               (find updated-url source-uri))))
-     ((eq? fetch-method download:git-fetch)
+     ((and (eq? fetch-method download:git-fetch)
+           (string-prefix? "https://github.com/"
+                           (download:git-reference-url source-uri)))
       (download:git-reference-url source-uri))
      (else #f))))
 
-- 
2.19.2


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

  reply	other threads:[~2019-01-20 18:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-20  9:32 bug#34144: guix import github crash Efraim Flashner
2019-01-20 18:41 ` Arun Isaac [this message]
2019-01-20 19:16   ` Ricardo Wurmus
2019-01-20 19:51     ` Arun Isaac

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cu7bm4bw4qz.fsf@systemreboot.net \
    --to=arunisaac@systemreboot.net \
    --cc=34144@debbugs.gnu.org \
    --cc=bavier@member.fsf.org \
    --cc=efraim@flashner.co.il \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).