diff options
author | Philip Kaludercic <philipk@posteo.net> | 2023-02-22 15:23:43 +0100 |
---|---|---|
committer | Philip Kaludercic <philipk@posteo.net> | 2023-02-24 17:14:19 +0100 |
commit | 068f8fa3037dfcb7696f1c0e89a622f7fe609994 (patch) | |
tree | 8ee9b7c008d779fde9f3d7ae5994ba9b3a1b3145 /lisp/emacs-lisp | |
parent | 925724a4b54a6780bfa342bc3a6440a6ad0a6ecc (diff) | |
download | emacs-068f8fa3037dfcb7696f1c0e89a622f7fe609994.tar.gz emacs-068f8fa3037dfcb7696f1c0e89a622f7fe609994.tar.bz2 emacs-068f8fa3037dfcb7696f1c0e89a622f7fe609994.zip |
Ensure right package-desc-type before installing package
* lisp/emacs-lisp/package-vc.el (package-vc--unpack): Move copying
code from 'package-vc-install'.
(package-vc-install): Remove copying. (Bug#61669)
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/package-vc.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el index b753adcb8a0..b22823fd706 100644 --- a/lisp/emacs-lisp/package-vc.el +++ b/lisp/emacs-lisp/package-vc.el @@ -615,6 +615,10 @@ PKG-SPEC is a package specification, a property list describing how to fetch and build the package. See `package-vc--archive-spec-alist' for details. The optional argument REV specifies a specific revision to checkout. This overrides the `:branch' attribute in PKG-SPEC." + (unless (eq (package-desc-kind pkg-desc) 'vc) + (let ((copy (copy-package-desc pkg-desc))) + (setf (package-desc-kind copy) 'vc + pkg-desc copy))) (pcase-let* (((map :lisp-dir) pkg-spec) (name (package-desc-name pkg-desc)) (dirname (package-desc-full-name pkg-desc)) @@ -826,9 +830,7 @@ regular package, but it will not remove a VC package. rev))) ((and-let* ((desc (assoc package package-archive-contents #'string=))) (package-vc--unpack - (let ((copy (copy-package-desc (cadr desc)))) - (setf (package-desc-kind copy) 'vc) - copy) + (cadr desc) (or (package-vc--desc->spec (cadr desc)) (and-let* ((extras (package-desc-extras (cadr desc))) (url (alist-get :url extras)) |