emacs-diffs
[Top][All Lists]
Advanced

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

scratch/package-vc-fixes e4ca73c8cb 3/4: fixup! Improve robustness of 'p


From: Philip Kaludercic
Subject: scratch/package-vc-fixes e4ca73c8cb 3/4: fixup! Improve robustness of 'package-vc-update'
Date: Tue, 15 Nov 2022 08:36:49 -0500 (EST)

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

    fixup! Improve robustness of 'package-vc-update'
---
 lisp/emacs-lisp/package-vc.el | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
index ea724dd9ff..93e20bca85 100644
--- a/lisp/emacs-lisp/package-vc.el
+++ b/lisp/emacs-lisp/package-vc.el
@@ -564,22 +564,15 @@ installed package."
   ;; 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))
-           (empty (make-symbol "empty"))
-           (args (list empty empty empty empty))
+           (vc-flags)
            (vc-filter-command-function
             (lambda (command file-or-list flags)
-              (setf (nth 0 args) command
-                    (nth 1 args) file-or-list
-                    (nth 2 args) flags
-                    (nth 3 args) default-directory)
+              (setq vc-flags flags)
               (list command file-or-list flags)))
            (post-upgrade
-            (lambda (command file-or-list flags)
-              (when (and (memq (nth 0 args) (list command empty))
-                         (memq (nth 1 args) (list file-or-list empty))
-                         (memq (nth 2 args) (list flags empty))
-                         (or (eq (nth 3 args) empty)
-                             (file-equal-p (nth 3 args) default-directory)))
+            (lambda (_command _file-or-list flags)
+              (when (and (file-equal-p pkg-dir default-directory)
+                         (eq flags vc-flags))
                 (unwind-protect
                     (with-demoted-errors "Failed to activate: %S"
                       (package-vc--unpack-1 pkg-desc pkg-dir))



reply via email to

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