Skip to content
Snippets Groups Projects
Unverified Commit 9a5091d0 authored by Arun Isaac's avatar Arun Isaac
Browse files

import: github: Do not update URI for packages using git-fetch.

* guix/import/github.scm (updated-github-url): Return the unchanged source URI
for packages using git-fetch.
[updated-url]: Do not handle URIs which end with ".git".
parent 4eacd52c
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@
;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
;;; Copyright © 2017, 2018 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2019 Arun Isaac <arunisaac@systemreboot.net>
;;;
;;; This file is part of GNU Guix.
;;;
......@@ -54,7 +55,6 @@ (define (updated-url url)
(github-user-slash-repository url)))
(repo (github-repository url)))
(cond
((string-suffix? ".git" url) url)
((string-suffix? (string-append "/tarball/v" version) url)
(string-append prefix "/tarball/v" new-version))
((string-suffix? (string-append "/tarball/" version) url)
......@@ -99,7 +99,7 @@ (define (updated-url url)
((source-uri ...)
(find updated-url source-uri))))
((eq? fetch-method download:git-fetch)
(updated-url (download:git-reference-url source-uri)))
(download:git-reference-url source-uri))
(else #f))))
(define (github-package? package)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment