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

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

[elpa] elpa-admin cabb85a: * elpa-admin.el: Avoid build side-products in


From: Stefan Monnier
Subject: [elpa] elpa-admin cabb85a: * elpa-admin.el: Avoid build side-products in the tarball
Date: Sat, 26 Dec 2020 00:09:15 -0500 (EST)

branch: elpa-admin
commit cabb85a720ccd7b85d8e59f65f29fae96cd6987a
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    * elpa-admin.el: Avoid build side-products in the tarball
    
    (elpaa--make-one-tarball): Fix last change.
    (elpaa--build-Info-1): Remove intermediate .texi file when building
    from a .org file.
    (elpaa-batch-main-files): New function.
---
 elpa-admin.el | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/elpa-admin.el b/elpa-admin.el
index 2de8e95..e9b59d4 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -350,7 +350,8 @@ Return non-nil if a new tarball was created."
                    (cons (match-string 1 file) file))
                  (directory-files destdir nil re)))))
         (when ldir
-          (cl-pushnew (list (file-name-as-directory ldir) "") renames))
+          (cl-pushnew (list (file-name-as-directory ldir) "") renames
+                      :test #'equal))
         (when revision-function
           (elpaa--select-revision dir pkg-spec (funcall revision-function)))
         (elpaa--copyright-check pkg-spec)
@@ -1429,7 +1430,8 @@ More at " (elpaa--default-url pkgname))
       (elpaa--build-Info-1 f dir))))
 
 (defun elpaa--build-Info-1 (docfile dir)
-  (let* ((default-directory (elpaa--dirname dir)))
+  (let* ((default-directory (elpaa--dirname dir))
+         (tmpfiles '()))
     (when (and docfile (file-readable-p docfile)
                (string-match "\\.org\\'" docfile))
       (with-temp-buffer
@@ -1441,6 +1443,7 @@ More at " (elpaa--default-url pkgname))
         (when (re-search-backward "ELPATEXI=\\(.*\\)\n?" nil t)
           (setq docfile (concat (file-name-directory docfile)
                                 (match-string 1)))
+          (push docfile tmpfiles)
           (elpaa--temp-file docfile))))
 
     (when (and docfile (file-readable-p docfile)
@@ -1474,6 +1477,8 @@ More at " (elpaa--default-url pkgname))
         (copy-file docfile info-file)
         (setq docfile info-file)))
 
+    (mapc #'delete-file tmpfiles)     ;Avoid intermediate files in the tarball.
+
     (when (and docfile (file-readable-p docfile))
       (let ((dir-file (expand-file-name "dir")))
         (elpaa--temp-file dir-file)
@@ -1696,5 +1701,19 @@ More at " (elpaa--default-url pkgname))
                             (concat lisp-dir "/" pkgname "-autoloads.el"))
                     nil alf nil 'silent))))
 
+;;; Main files
+
+(defun elpaa-batch-main-files ()
+  (let ((dstfile (pop command-line-args-left)))
+    (with-temp-buffer
+      (dolist (pkg-spec (elpaa--get-specs))
+        (let* ((pkgname (car pkg-spec))
+               (defmf (concat pkgname ".el"))
+               (mf (elpaa--main-file pkg-spec)))
+          (unless (equal mf defmf)
+            (insert (format "%s:%s\n" pkgname mf)))))
+      (write-region (point-min) (point-max)
+                    dstfile nil 'silent))))
+
 (provide 'elpa-admin)
 ;;; elpa-admin.el ends here



reply via email to

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