branch: elpa/helm
commit 9aca1909cd8f01abd4d29e93c31170348c145b0c
Author: Thierry Volpiatto <thie...@posteo.net>
Commit: Thierry Volpiatto <thie...@posteo.net>

    Fix :url specified as a symbol making reference to another package
    
    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)
---
 helm-packages.el | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/helm-packages.el b/helm-packages.el
index 3b5c5874c4..1028b5824a 100644
--- a/helm-packages.el
+++ b/helm-packages.el
@@ -264,8 +264,15 @@ PROVIDER can be one of \"gnu\" or \"nongnu\"."
                              (url-insert-file-contents address)
                              (goto-char (point-min))
                              (read (current-buffer))))))
-         (package-recipe (assq package recipe)))
-    (plist-get (cdr package-recipe) :url)))
+         (package-recipe (assq package recipe))
+         (url (plist-get (cdr package-recipe) :url)))
+    (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))))
 
 (defun helm-packages-get-provider (package)
   (let ((desc (assq package package-archive-contents)))

Reply via email to