summary refs log tree commit diff
diff options
context:
space:
mode:
authorArun Isaac <arunisaac@systemreboot.net>2019-01-20 22:18:32 +0530
committerArun Isaac <arunisaac@systemreboot.net>2019-01-21 01:17:52 +0530
commit2034a231dcfbf0507930597492b986bfd5cf4c37 (patch)
tree1ddefb6b5bdeef0685f68b692be680f3f533816b
parente5ad2cdf172eecc7edef37a500593b1941af013c (diff)
downloadguix-2034a231dcfbf0507930597492b986bfd5cf4c37.tar.gz
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.
-rw-r--r--guix/import/github.scm4
1 files changed, 3 insertions, 1 deletions
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))))