From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Feng Shu 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 18:37:50 +0800 Message-ID: <87bko5ne9t.fsf@163.com> References: <87pmdztrsy.fsf@163.com> <87tu1xug60.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32780"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 59088@debbugs.gnu.org To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 15 11:38:14 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 1p5ld0-0008Jv-1r for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Dec 2022 11:38:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5lcq-0005FT-Hd; Thu, 15 Dec 2022 05:38:04 -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 1p5lco-0005F7-ML for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 05:38:02 -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 1p5lco-0000us-ES for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 05:38:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p5lco-0001Un-9w for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 05:38:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Feng Shu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Dec 2022 10:38: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.16711006765743 (code B ref 59088); Thu, 15 Dec 2022 10:38:02 +0000 Original-Received: (at 59088) by debbugs.gnu.org; 15 Dec 2022 10:37:56 +0000 Original-Received: from localhost ([127.0.0.1]:42752 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5lch-0001UZ-TI for submit@debbugs.gnu.org; Thu, 15 Dec 2022 05:37:56 -0500 Original-Received: from m12.mail.163.com ([123.126.96.233]:34508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5lcf-0001UT-6X for 59088@debbugs.gnu.org; Thu, 15 Dec 2022 05:37:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=egYIJ d6Ve+PSz4A+SWA0WFHtXuuWQPG7qkEVMw8aeS4=; b=lcPAn53Lxs/7oNsKb9epf r51gigolRSb54EHx5Ny9iUK3NYQRuEqacsbe7/l6ycaks1q1/TqVbpRdK/NP7h07 rXMrrkeYQMd5igcTrvZzfsafuv8WtlNcSRyn+P1gLswef6QfY910TvALbDUFHJFM 0J8DJd+YuQL+tvF6bVJ+cE= Original-Received: from Guix (unknown [49.88.145.87]) by smtp18 (Coremail) with SMTP id JNxpCgC3++D++Jpj0Ij9BA--.60457S2; Thu, 15 Dec 2022 18:37:50 +0800 (CST) In-Reply-To: <87tu1xug60.fsf@posteo.net> (Philip Kaludercic's message of "Thu, 15 Dec 2022 10:15:03 +0000") X-CM-TRANSID: JNxpCgC3++D++Jpj0Ij9BA--.60457S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxZr1UKry5Zr1DGr4xGrWrAFb_yoW5tF1fpr yfCas7Ka48t3Wxt3sxKr18uFWrJFZ8tryDKw4DJ3yxJFWDWr10grWYkFZY9ay2qr17t34U Za1vv39rXrW8ArJanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0zR8Ma8UUUUU= X-Originating-IP: [49.88.145.87] X-CM-SenderInfo: 5wxpt2lkx6il2tof0z/xtbB0x-Y1FXlxWSdxwAAsL 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:251058 Archived-At: Philip Kaludercic writes: > 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))))) works! --