emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] elpa-admin 096a766a7a: Generate elpa-packages.eld with package da


From: Philip Kaludercic
Subject: [elpa] elpa-admin 096a766a7a: Generate elpa-packages.eld with package data
Date: Sat, 22 Oct 2022 11:32:41 -0400 (EDT)

branch: elpa-admin
commit 096a766a7a12746d9b9f271dc017bd6ad94d1633
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    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 | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

diff --git a/elpa-admin.el b/elpa-admin.el
index d8f84e7205..a1eec9c448 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -761,13 +761,34 @@ 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)
+        (pcase spec
+          (`(,name :url nil . ,rest)
+           `((,name :url ,(concat "https://git.sv.gnu.org/git/"; elpaa--gitrepo)
+                    :branch ,(concat elpaa--branch-prefix (car spec))
+                    ,@rest)))
+          (`(,_ :core ,_ . ,_) nil)       ;not supported
+          (_ (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."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]