Revert "Attempt to install package first when upgrading"
This reverts commit 3d8e49c41a
.
This commit is contained in:
parent
fbcb357b9d
commit
dffd4a50c6
1 changed files with 3 additions and 7 deletions
|
@ -2272,16 +2272,12 @@ had been enabled."
|
||||||
;; `pkg-desc' will be nil when the package is an "active built-in".
|
;; `pkg-desc' will be nil when the package is an "active built-in".
|
||||||
(if (and pkg-desc (package-vc-p pkg-desc))
|
(if (and pkg-desc (package-vc-p pkg-desc))
|
||||||
(package-vc-upgrade pkg-desc)
|
(package-vc-upgrade pkg-desc)
|
||||||
|
(when pkg-desc
|
||||||
|
(package-delete pkg-desc 'force 'dont-unselect))
|
||||||
(package-install package
|
(package-install package
|
||||||
;; An active built-in has never been "selected"
|
;; An active built-in has never been "selected"
|
||||||
;; before. Mark it as installed explicitly.
|
;; before. Mark it as installed explicitly.
|
||||||
(and pkg-desc 'dont-select))
|
(and pkg-desc 'dont-select)))))
|
||||||
;; We delete the old package via the descriptor after installing
|
|
||||||
;; the new package to avoid losing the package if there issues
|
|
||||||
;; during installation (Bug#74556).
|
|
||||||
(when pkg-desc
|
|
||||||
(cl-assert (package-desc-dir pkg-desc))
|
|
||||||
(package-delete pkg-desc 'force 'dont-unselect)))))
|
|
||||||
|
|
||||||
(defun package--upgradeable-packages (&optional include-builtins)
|
(defun package--upgradeable-packages (&optional include-builtins)
|
||||||
;; Initialize the package system to get the list of package
|
;; Initialize the package system to get the list of package
|
||||||
|
|
Loading…
Add table
Reference in a new issue