emacs-diffs
[Top][All Lists]
Advanced

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

scratch/package-vc-fixes 42b01caac1 39/48: Avoid updating non-source pac


From: Philip Kaludercic
Subject: scratch/package-vc-fixes 42b01caac1 39/48: Avoid updating non-source packages in 'package-vc-update-all'
Date: Wed, 16 Nov 2022 04:50:08 -0500 (EST)

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

    Avoid updating non-source packages in 'package-vc-update-all'
    
    * lisp/emacs-lisp/package-vc.el (package-vc-update-all): Check if a
    package is a source package.
    (package-vc-update): Add an assertion to verify this.
---
 lisp/emacs-lisp/package-vc.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
index 41eae81491..5c322ac7b4 100644
--- a/lisp/emacs-lisp/package-vc.el
+++ b/lisp/emacs-lisp/package-vc.el
@@ -540,7 +540,8 @@ installed package."
   (interactive)
   (dolist (package package-alist)
     (dolist (pkg-desc (cdr package))
-      (package-vc-update pkg-desc))))
+      (when (package-vc-p pkg-desc)
+        (package-vc-update pkg-desc)))))
 
 (defun package-vc-update (pkg-desc)
   "Attempt to update the package PKG-DESC."
@@ -557,6 +558,7 @@ installed package."
   ;; `package-vc--unpack-1'.  Ugh...
   ;;
   ;; If there is a better way to do this, it should be done.
+  (cl-assert (package-vc-p pkg-desc))
   (letrec ((pkg-dir (package-desc-dir pkg-desc))
            (vc-flags)
            (vc-filter-command-function



reply via email to

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