From 98ac710ca97ebca5be1f9bf49b40a701c541b21d Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Mon, 17 Oct 2022 00:05:17 +0200 Subject: [PATCH] Add 'package-vc' to package metadata * elpa-admin.el (elpaa--metadata): Add :upstream property. --- elpa-admin.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/elpa-admin.el b/elpa-admin.el index 054c9bda86..f22c345cd9 100644 --- a/elpa-admin.el +++ b/elpa-admin.el @@ -1074,6 +1074,18 @@ PKG is the name of the package and DIR is the directory where it is." (unless found-url ;; Provide a good default URL. (push (cons :url (elpaa--default-url pkg)) extras)) + ;; Add `package-vc' data + (let ((spec (cdr pkg-spec)) + (ups (list :upstream 'Git nil nil nil))) + (if (null (plist-get spec :url)) + (setf (nth 2 ups) (concat "https://git.savannah.gnu.org/git/" + elpaa--gitrepo) + (nth 3 ups) (plist-get spec :lisp-dir) + (nth 4 ups) (concat elpaa--branch-prefix pkg)) + (setf (nth 2 ups) (plist-get spec :url) + (nth 3 ups) (plist-get spec :lisp-dir) + (nth 4 ups) (plist-get spec :branch))) + (push ups extras)) (list simple (package-version-join version) (package-desc-summary pkg-desc) -- 2.38.0