Philip Kaludercic <[email protected]> writes:

> Stefan Monnier <[email protected]> writes:
>
>>>> There's no reason not to other than the fact that the code currently
>>>> doesn't do it.
>>> Can I ask for it to be done, then?
>>
>> AFAIK the request has already been registered, i.e. it's in my TODO.  🙂
>
> FWIW I can also take care of it, in the worse case by the weekend.

It seems to me that

diff --git a/elpa-admin.el b/elpa-admin.el
index c9d7c47fa7..87ef36aa0f 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -641,16 +641,7 @@ returns.  Return the selected revision."
               (make-directory olddir t)
               (funcall mvfun filename)
               (funcall mvfun sig))))
-        (setq oldtarballs keep)))
-    (dolist (oldtarball oldtarballs)
-      ;; Compress oldtarballs.
-      (let ((file (cdr oldtarball)))
-        (when (string-match "\\.\\(tar\\|el\\)\\'" file)
-          ;; Make sure we don't compress the file we just created.
-          (cl-assert (not (equal file (file-name-nondirectory tarball))))
-          ;; (elpaa--message "not equal %s and %s" file tarball)
-          (elpaa--call nil "lzip" (expand-file-name file destdir))
-          (setf (cdr oldtarball) (concat file ".lz"))))))
+        (setq oldtarballs keep))))
   oldtarballs)
 
 (defun elpaa--report-failure ( pkg-spec metadata txt basename destdir
@@ -887,6 +878,7 @@ auxiliary files unless TARBALL-ONLY is non-nil ."
               ,(format "s|^packages/%s|%s-%s|" pkg pkg vers)
               "-chf" ,tarball
               ,(format "packages/%s" pkg)))
+     (elpaa--call nil "lzip" "-k" tarball)
      (cl-assert (file-readable-p tarball))
      (unless tarball-only
        (let* ((pkgdesc
@@ -909,9 +901,10 @@ auxiliary files unless TARBALL-ONLY is non-nil ."
                           (format "%s-release/%s-%s"
                                   elpaa--name pkg vers))))
          (let ((link (expand-file-name (format "%s.tar" pkg) destdir)))
-	   (when (file-symlink-p link) (delete-file link))
 	   (ignore-error file-error     ;E.g. under w32!
-	     (make-symbolic-link (file-name-nondirectory tarball) link)))
+	     (make-symbolic-link (file-name-nondirectory tarball) link t)
+             (make-symbolic-link (file-name-nondirectory (concat tarball ".lz"))
+                                 (concat link ".lz") t)))
          (setq oldtarballs
                (let ((elpaa--keep-max
                       ;; In the devel directory, don't bother keeping so
could solve the issue.  This does not compress standalone .el files,
which I don't think we have anymore anyway.  Here is an overview of all
the files we now generate for an example package:

--8<---------------cut here---------------start------------->8---
  -rw-rw-r--   1 phi phi  41K Jun  8  2025 vertico-2.2.tar.lz
  -rw-rw-r--   1 phi phi 250K Dec 13 13:20 vertico-2.6.tar
  -rw-rw-r--   1 phi phi  42K Dec 13 13:19 vertico-2.6.tar.lz
  -rw-rw-r--   1 phi phi  57K Dec 13 13:20 vertico.html
  -rw-rw-r--   1 phi phi  60K Jun  8  2025 vertico-posframe-0.8.0.tar
  -rw-rw-r--   1 phi phi 5.5K Jun  8  2025 vertico-posframe.html
  -rw-rw-r--   1 phi phi 2.7K Jun  8  2025 vertico-posframe-readme.txt
  -rw-rw-r--   1 phi phi 1.3K Jun  8  2025 vertico-posframe.svg
  lrwxrwxrwx   1 phi phi   26 Jun  8  2025 vertico-posframe.tar -> 
vertico-posframe-0.8.0.tar
  -rw-rw-r--   1 phi phi 1.2K Jun  8  2025 vertico-posframe.xml
  -rw-rw-r--   1 phi phi  41K Dec 13 13:20 vertico-readme.txt
  -rw-rw-r--   1 phi phi 1.2K Dec 13 13:20 vertico.svg
  lrwxrwxrwx   1 phi phi   15 Dec 13 13:20 vertico.tar -> vertico-2.6.tar
  lrwxrwxrwx   1 phi phi   18 Dec 13 13:20 vertico.tar.lz -> vertico-2.6.tar.lz
--8<---------------cut here---------------end--------------->8---


>> But it's fairly crowded in there, so if you're in a hurry you might be able 
>> to
>> speed it up by providing a patch for `elpa-admin.el`.
>>
>> You can get that code with:
>>
>>     git clone --single-branch https://git.sv.gnu.org/git/emacs/elpa.git
>>     make
>>
>> after which it's in the `admin` subdir.  Or you can fetch it more
>> directly with:
>>
>>     git clone --single-branch --branch elpa-admin 
>> https://git.sv.gnu.org/git/emacs/elpa.git
>>
>> Don't forget the `--single-branch` because there are many unrelated
>> branches in there.
>>
>>
>>         Stefan

Reply via email to