branch: elpa/helm commit 7346b07c4fc369127cb458df0bf82a0b29a9625e Author: Thierry Volpiatto <thie...@posteo.net> Commit: Thierry Volpiatto <thie...@posteo.net>
Workaround unrelated urls found in gnu archive In gnu archive all orphaned packages (many) are pointing to "https://git.sv.gnu.org/git/emacs/elpa.git" instead of nil which create a redirection to a savannah url and finally make git clone fails as the url is unrelated to package. --- helm-packages.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/helm-packages.el b/helm-packages.el index e84ca93547..3f9644c2d4 100644 --- a/helm-packages.el +++ b/helm-packages.el @@ -266,13 +266,19 @@ PROVIDER can be one of \"gnu\" or \"nongnu\"." (car (read (current-buffer))))))) (package-recipe (assq package recipe)) (url (plist-get (cdr package-recipe) :url))) + ;; In gnu archive all orphaned packages are pointing to + ;; "https://git.sv.gnu.org/git/emacs/elpa.git" instead of nil which create a + ;; redirection to a savannah url and finally make git clone fails as the url + ;; is unrelated to package. + (when (string-match "\\`http[s]?://git.sv.gnu.org" url) + (setq url nil)) (if (stringp url) url ;; Sometimes the recipe for a package refers to the same url as another ;; package by setting :url to the name of this package (symbol) e.g. ;; In nongnu recipe, we have: ;; (helm :url "https://...") and (helm-core :url helm) - (plist-get (cdr (assq url recipe)) :url)))) + (and url (plist-get (cdr (assq url recipe)) :url))))) (defun helm-packages-get-provider (package) (let ((desc (assq package package-archive-contents)))