From 0b77909cac1ef6705dfb1d4aed0d64ccc55864cf Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Wed, 16 Nov 2022 10:37:10 +0100 Subject: [PATCH] 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. --- lisp/emacs-lisp/package-vc.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.2