Commit a31ca4ef authored by Artur Malabarba's avatar Artur Malabarba

* lisp/emacs-lisp/package.el: Fix selected-package logic

(package-menu-execute): Mark as selected all non-upgrade packages
being installed.
(package-menu--perform-transaction): Don't mark anything.
parent 60c1ea3d
...@@ -2943,12 +2943,9 @@ objects removed." ...@@ -2943,12 +2943,9 @@ objects removed."
(format status-format (cl-incf i))) (format status-format (cl-incf i)))
(force-mode-line-update) (force-mode-line-update)
(redisplay 'force) (redisplay 'force)
(package-install ;; Don't mark as selected, `package-menu-execute' already
;; Don't mark as selected if it's a new version of an ;; does that.
;; installed package. (package-install pkg 'dont-select)))
pkg (and (not (package-installed-p pkg))
(package-installed-p
(package-desc-name pkg))))))
;; Once there are no more packages to install, proceed to ;; Once there are no more packages to install, proceed to
;; deletion. ;; deletion.
(let ((package-menu--transaction-status ":Deleting")) (let ((package-menu--transaction-status ":Deleting"))
...@@ -2995,6 +2992,10 @@ Optional argument NOQUERY non-nil means do not ask the user to confirm." ...@@ -2995,6 +2992,10 @@ Optional argument NOQUERY non-nil means do not ask the user to confirm."
(when .upgrade (format "Upgrad__ %s" (length .upgrade))) (when .upgrade (format "Upgrad__ %s" (length .upgrade)))
"]"))) "]")))
(message (replace-regexp-in-string "__" "ing" message-template) "started") (message (replace-regexp-in-string "__" "ing" message-template) "started")
;; Packages being upgraded are not marked as selected.
(package--save-selected-packages
(remove-dups (append (mapcar #'package-desc-name .install)
package-selected-packages)))
(package-menu--perform-transaction install-list delete-list) (package-menu--perform-transaction install-list delete-list)
(when package-selected-packages (when package-selected-packages
(if-let ((removable (package--removable-packages))) (if-let ((removable (package--removable-packages)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment