emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

scratch/package-vc-fixes dfed8fa9bb 4/4: Remove duplicate package descri


From: Philip Kaludercic
Subject: scratch/package-vc-fixes dfed8fa9bb 4/4: Remove duplicate package descriptions after updating
Date: Tue, 15 Nov 2022 08:36:49 -0500 (EST)

branch: scratch/package-vc-fixes
commit dfed8fa9bb24a8d22a8638316c74e1cdf69bccc2
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    Remove duplicate package descriptions after updating
    
    * lisp/emacs-lisp/package-vc.el (package-vc--unpack-1): Ensure there
    is always just one instance of a package description in 'package-alist'.
---
 lisp/emacs-lisp/package-vc.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
index 93e20bca85..e31f2e5126 100644
--- a/lisp/emacs-lisp/package-vc.el
+++ b/lisp/emacs-lisp/package-vc.el
@@ -387,6 +387,11 @@ This includes downloading missing dependencies, generating
 autoloads, generating a package description file (used to
 identify a package as a source package later on), building
 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 pkgs))))
+
   ;; In case the package was installed directly from source, the
   ;; dependency list wasn't know beforehand, and they might have
   ;; to be installed explicitly.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]