From fe8530cde40d921b96ec29513d16d91114468e75 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Fri, 21 Oct 2022 23:18:30 +0200 Subject: [PATCH] Generate elpa-packages.eld with package data * elpa-admin.el (elpaa-publish-package-specs): Process specs and write file. (elpaa-batch-make-all-packages): Call 'elpaa-publish-package-specs'. --- elpa-admin.el | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/elpa-admin.el b/elpa-admin.el index 054c9bda86..00c3393499 100644 --- a/elpa-admin.el +++ b/elpa-admin.el @@ -762,13 +762,36 @@ of the current `process-environment'. Return the modified copy." (list pkgname)) spec))) +(defun elpaa-publish-package-specs (specs) + "Process and publish SPECS in elpa-packages.eld files." + (with-temp-buffer + ;; Remove :core packages, handle :url nil and and compress the + ;; contents of the "elpa-packages" + (prin1 + (mapcan + (lambda (spec) + (cond + ((and (plist-member (cdr spec) :url) + (null (plist-get (cdr spec) :url))) + `((,(car spec) + :url ,(concat "https://git.sv.gnu.org/git/" elpaa--gitrepo) + :branch ,(concat elpaa--branch-prefix (car spec)) + ,@(cdddr spec)))) + ((plist-member (cdr spec) :core) nil) + ((list spec)))) + specs) + (current-buffer)) + (write-region nil nil (expand-file-name "elpa-packages.eld" elpaa--release-subdir)) + (write-region nil nil (expand-file-name "elpa-packages.eld" elpaa--devel-subdir)))) + (defun elpaa-batch-make-all-packages (&rest _) "Check all the packages and build the relevant new tarballs." - (let* ((specs (elpaa--get-specs))) + (let ((specs (elpaa--get-specs))) (dolist (spec specs) (condition-case err (elpaa--make-one-package spec) - (error (message "Build error for %s: %S" (car spec) err)))))) + (error (message "Build error for %s: %S" (car spec) err)))) + (elpaa-publish-package-specs specs))) (defun elpaa-batch-make-one-package (&rest _) "Build the new tarballs (if needed) for one particular package." -- 2.38.0