From: Philip Kaludercic <philipk@posteo.net>
To: Feng Shu <tumashu@163.com>
Cc: 59088@debbugs.gnu.org
Subject: bug#59088: 29.0.50; void-function package-vc-update when first run package-update-all.
Date: Thu, 15 Dec 2022 10:15:03 +0000 [thread overview]
Message-ID: <87tu1xug60.fsf@posteo.net> (raw)
In-Reply-To: <87pmdztrsy.fsf@163.com> (Feng Shu's message of "Mon, 07 Nov 2022 10:35:41 +0800")
Feng Shu <tumashu@163.com> writes:
> Debugger entered--Lisp error: (void-function package-vc-update)
> package-vc-update(#s(package-desc :name pyim :version (5 2 8) :summary "A Chinese input method support quanpin, shuangpin,..." :reqs ((emacs (25 1)) (async (1 6)) (xr (1 13))) :kind vc :archive nil :dir "/home/feng/.emacs.d/elpa-29/pyim" :extras ((:url . "https://github.com/tumashu/pyim") (:keywords "convenience" "chinese" "pinyin" "input-method") (:maintainer "Feng Shu" . "tumashu@163.com") (:authors ("Ye Wenbin" . "wenbinye@163.com") ("Feng Shu" . "tumashu@163.com")) (:commit . "8c4f7d40c05dc06b3c96c2955e5d72ec268f2b61")) :signed nil))
> package-update(pyim)
> mapc(package-update (pyim))
> package-update-all(t)
> funcall-interactively(package-update-all t)
> call-interactively(package-update-all record nil)
> command-execute(package-update-all record)
> execute-extended-command(nil "package-update-all" nil)
> funcall-interactively(execute-extended-command nil "package-update-all" nil)
> call-interactively(execute-extended-command nil nil)
> command-execute(execute-extended-command)
The function has been autoloaded, so this shouldn't occur any more:
commit 17889dd828dabc8d4a015c3df889799818178afb
Author: Philip Kaludercic <philipk@posteo.net>
Date: Thu Nov 17 17:39:46 2022 +0100
* lisp/emacs-lisp/package-vc.el: Autoload package-vc-update{,-all}
diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
--- a/lisp/emacs-lisp/package-vc.el
+++ b/lisp/emacs-lisp/package-vc.el
@@ -573,35 +574,36 @@
+;;;###autoload
(defun package-vc-update (pkg-desc)
"Attempt to update the package PKG-DESC."
(interactive (list (package-vc--read-package-desc "Update source package: " t)))
;; HACK: To run `package-vc--unpack-1' after checking out the new
;; revision, we insert a hook into `vc-post-command-functions', and
;; remove it right after it ran. To avoid running the hook multiple
;; times or even for the wrong repository (as `vc-pull' is often
;; asynchronous), we extract the relevant arguments using a pseudo
;; filter for `vc-filter-command-function', executed only for the
;; side effect, and store them in the lexical scope. When the hook
;; is run, we check if the arguments are the same (`eq') as the ones
;; previously extracted, and only in that case will be call
;; `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
(lambda (command file-or-list flags)
(setq vc-flags flags)
(list command file-or-list flags)))
(post-upgrade
(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))
(remove-hook 'vc-post-command-functions post-upgrade))))))
(add-hook 'vc-post-command-functions post-upgrade)
(with-demoted-errors "Failed to fetch: %S"
(let ((default-directory pkg-dir))
(vc-pull)))))
next prev parent reply other threads:[~2022-12-15 10:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-07 2:35 bug#59088: 29.0.50; void-function package-vc-update when first run package-update-all Feng Shu
2022-12-15 10:15 ` Philip Kaludercic [this message]
2022-12-15 10:37 ` Feng Shu
2022-12-15 12:59 ` Philip Kaludercic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tu1xug60.fsf@posteo.net \
--to=philipk@posteo.net \
--cc=59088@debbugs.gnu.org \
--cc=tumashu@163.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).