From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs 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 Message-ID: <87tu1xug60.fsf@posteo.net> References: <87pmdztrsy.fsf@163.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1390"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59088@debbugs.gnu.org To: Feng Shu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 15 11:16:28 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p5lHw-00009g-CA for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Dec 2022 11:16:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5lHb-0008Fc-1r; Thu, 15 Dec 2022 05:16:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5lHX-0008FQ-B6 for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 05:16:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p5lHW-00005B-ME for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 05:16:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p5lHW-0001FQ-HM for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 05:16:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Dec 2022 10:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59088 X-GNU-PR-Package: emacs Original-Received: via spool by 59088-submit@debbugs.gnu.org id=B59088.16710993114759 (code B ref 59088); Thu, 15 Dec 2022 10:16:02 +0000 Original-Received: (at 59088) by debbugs.gnu.org; 15 Dec 2022 10:15:11 +0000 Original-Received: from localhost ([127.0.0.1]:42722 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5lGg-0001Eh-JO for submit@debbugs.gnu.org; Thu, 15 Dec 2022 05:15:11 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]:45741) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5lGd-0001EY-U4 for 59088@debbugs.gnu.org; Thu, 15 Dec 2022 05:15:09 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 096A2240029 for <59088@debbugs.gnu.org>; Thu, 15 Dec 2022 11:15:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1671099302; bh=RWIQ8DIetCkJULNkdjLJZwtJbJmv2aM2UZKpIj+07eU=; h=From:To:Cc:Subject:Date:From; b=AsUc2P5HhdS7m7AB9S4c5+yFprBFXQ+1crwWK48keuAH/rJ4c813RghWNZrMe5rgV 9zsmpmCzRLPn3vJjpE7EQnVkGgJ4/SaNZOcu6wQEZhCaBkzGvF29hmnwxa6iT7Gbex oouPK/Ksh5g7PMS9ktoAt6ySJQUB+BVxPXZdJGV8iQj+J5aAKK90Gm5voUe3kEgJhn +YvBz/iW903rqMOa8wXN7B4F9YEWl2yvVyJkNI9bZsaM7/Q3BKzEErSvlxkzBkcVtn bf6ZT5hWau7UB7V0D2QopVjvxeAb46lEIIQrEXN+y8yJrIS8m8Yrun1z552y2/HTVN zoThAdmCgP3RQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NXp512tjcz6tm9; Thu, 15 Dec 2022 11:15:00 +0100 (CET) In-Reply-To: <87pmdztrsy.fsf@163.com> (Feng Shu's message of "Mon, 07 Nov 2022 10:35:41 +0800") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:251053 Archived-At: Feng Shu 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 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)))))