summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorPhilip Kaludercic <philipk@posteo.net>2022-11-16 10:37:10 +0100
committerPhilip Kaludercic <philipk@posteo.net>2022-11-17 20:55:04 +0100
commit0b77909cac1ef6705dfb1d4aed0d64ccc55864cf (patch)
tree74580863dffc7ea13bcd438e94bd4b510f008f6a /lisp/emacs-lisp
parent5b8f165f75698f3d0dd612129f4e6405430567e7 (diff)
downloademacs-0b77909cac1ef6705dfb1d4aed0d64ccc55864cf.tar.gz
emacs-0b77909cac1ef6705dfb1d4aed0d64ccc55864cf.tar.bz2
emacs-0b77909cac1ef6705dfb1d4aed0d64ccc55864cf.zip
Avoid duplicate source packages in 'package-alist'
* lisp/emacs-lisp/package-vc.el (package-vc--unpack-1): Remove all other source packages before installing the new package description.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/package-vc.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
index 8811f9ac7b7..7edecddaa1e 100644
--- a/lisp/emacs-lisp/package-vc.el
+++ b/lisp/emacs-lisp/package-vc.el
@@ -390,7 +390,7 @@ documentation and marking the package as installed."
;; Remove any previous instance of PKG-DESC from `package-alist'
(let ((pkgs (assq (package-desc-name pkg-desc) package-alist)))
(when pkgs
- (setf (cdr pkgs) (delq pkg-desc (cdr pkgs)))))
+ (setf (cdr pkgs) (seq-remove #'package-vc-p (cdr pkgs)))))
;; In case the package was installed directly from source, the
;; dependency list wasn't know beforehand, and they might have