emacs-31 effafd92e05 1/2: Load all dependencies when isolating a package
Philip Kaludercic <[email protected]>
| Newsgroups | gmane.emacs.diffs |
|---|---|
| Message-ID | <[email protected]> |
branch: emacs-31 commit effafd92e05a595b32d2fba41aadd7229f0947ce Author: Philip Kaludercic <[email protected]> Commit: Philip Kaludercic <[email protected]> Load all dependencies when isolating a package * lisp/emacs-lisp/package.el (package-isolate): Replace call to 'package-compute-transaction', which omits already inferred dependencies, with a manual dependency resolution. --- lisp/emacs-lisp/package.el | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 7e52e6decea..74e46392f84 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -2652,8 +2652,22 @@ intended for testing Emacs and/or the packages in a clean environment." current-prefix-arg))) (let* ((name (concat "package-isolate-" (mapconcat #'package-desc-full-name packages ","))) - (dependencies (apply #'append (mapcar #'package-desc-reqs packages))) - (all-packages (package-compute-transaction packages dependencies)) + (all-packages + (delete-dups + (nconc + (mapcan + (pcase-lambda (`(,name ,vers)) + (and (not (eq name 'emacs)) + (not (cl-find name packages :key #'package-desc-name)) + (if-let* ((desc (package-get-descriptor + name t + (lambda (desc) + (version-list-<= vers (package-desc-version desc)))))) + (list desc) + (error "Failed to find package: (%s %S)" name vers)))) + (package--dependencies packages)) + packages))) + (all-packages (seq-remove #'package-built-in-p all-packages)) (package-alist (copy-tree package-alist t)) (temp-install-dir nil) initial-scratch-message load-list) (when-let* ((missing (seq-remove #'package-installed-p all-packages))