Stefan Monnier writes: >> +(defun elpaa--scrub-archive-contents (dir) >> + "Remove dead packages from archive contents in DIR." >> + (let* ((filename (expand-file-name "archive-contents" dir)) >> + (ac (if (file-exists-p filename) >> + (elpaa--form-from-file-contents filename) >> + '(1))) >> + (specs (elpaa--get-specs))) >> + (elpaa--write-archive-contents >> + (cons (car ac) >> + (mapcan >> + (lambda (pkg) >> + (and (assoc (car pkg) specs #'string=) (list pkg))) >> + (cdr ac))) >> + dir))) >> + >> (defun elpaa--publish-package-specs (specs) >> "Process and publish SPECS in elpa-packages.eld files." >> (with-temp-buffer >> @@ -814,6 +833,8 @@ of the current `process-environment'. Return the modified copy." >> >> (defun elpaa-batch-make-all-packages (&rest _) >> "Check all the packages and build the relevant new tarballs." >> + (elpaa--scrub-archive-contents elpaa--release-subdir) >> + (elpaa--scrub-archive-contents elpaa--devel-subdir) >> (let ((specs (elpaa--get-specs))) >> (dolist (spec specs) >> (condition-case err > > Hmm... in `elpaa--scrub-archive-contents` you `elpaa--get-specs` but you > could skip that if you called this function a tiny bit later and passed > `specs` to it instead, right? No, you are absolutely right, I just didn't see that.