diff --git a/elpa-admin.el b/elpa-admin.el index d570c3c6aa..6714cd07a4 100644 --- a/elpa-admin.el +++ b/elpa-admin.el @@ -1015,14 +1015,25 @@ EXTRAS is an alist with additional metadata. PKG is the name of the package and DIR is the directory where it is." (let* ((pkg (car pkg-spec)) (mainfile (expand-file-name (elpaa--main-file pkg-spec) dir)) + (desc-file (expand-file-name (concat pkg "-pkg.el") dir)) (files (directory-files dir nil "\\`dir\\'\\|\\.el\\'"))) (setq files (delete (concat pkg "-pkg.el") files)) (setq files (delete (concat pkg "-autoloads.el") files)) (cond + ((file-exists-p desc-file) + (with-temp-buffer + (insert-file-contents desc-file) + (let* ((form (read (current-buffer))) + (pkg-desc (apply #'package-desc-from-define (cdr form)))) + (list (= (length files) 1) + (package-version-join (package-desc-version pkg-desc)) + (package-desc-summary pkg-desc) + (package-desc-reqs pkg-desc) + nil)))) ((file-exists-p mainfile) (with-temp-buffer - (insert-file-contents mainfile) - (goto-char (point-min)) + (insert-file-contents mainfile) + (goto-char (point-min)) (let* ((pkg-desc (unwind-protect (progn