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 12:59:12 +0000 Message-ID: <87h6xwvn4v.fsf@posteo.net> References: <87pmdztrsy.fsf@163.com> <87tu1xug60.fsf@posteo.net> <87bko5ne9t.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="15832"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59088-done@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 14:04:33 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 1p5nua-0003wi-Sc for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Dec 2022 14:04:33 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5nqm-0000dF-IK; Thu, 15 Dec 2022 08:00:36 -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 1p5nqE-0000V7-HO for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 08:00:05 -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 1p5nqE-0008Ov-6C for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 08:00:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p5nqE-0005ic-0F for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 08:00:02 -0500 Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Dec 2022 13:00:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 59088 X-GNU-PR-Package: emacs Mail-Followup-To: 59088@debbugs.gnu.org, philipk@posteo.net, tumashu@163.com Original-Received: via spool by 59088-done@debbugs.gnu.org id=D59088.167110915721924 (code D ref 59088); Thu, 15 Dec 2022 13:00:01 +0000 Original-Received: (at 59088-done) by debbugs.gnu.org; 15 Dec 2022 12:59:17 +0000 Original-Received: from localhost ([127.0.0.1]:42927 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5npU-0005hY-Rm for submit@debbugs.gnu.org; Thu, 15 Dec 2022 07:59:17 -0500 Original-Received: from mout02.posteo.de ([185.67.36.66]:53257) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5npT-0005hS-5g for 59088-done@debbugs.gnu.org; Thu, 15 Dec 2022 07:59:15 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id A2A3C24010A for <59088-done@debbugs.gnu.org>; Thu, 15 Dec 2022 13:59:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1671109149; bh=9/uGH1ZZ+5cx+BT7MSxY2gy6vLX9hKgfbXHjaS3HX5g=; h=From:To:Cc:Subject:Date:From; b=B8vbowxu5ET4CgTf5VTeHEJzay/YWoHF59W0lgOwWC00xNR86k/003OgeCGdUqC2w zAimLnITxiAIiZafrr7wCbAu3jnRcxPEkVVnOpbqSyniq7Noj9PjJ+5m5veY7XlwZC 5hf0MUGk6bCaTSyyi8oo4+8BMy2KlVr7vftm4f7pH4Ton77Boqn/pElZq1WVzJpcu7 s4LhorJgKXi0gS0EG2QmiMSMt5qSZRB/QUEJu6UU4GFchgK6sa/fIfRjk5k7cQarqS YSRCfQEOqdRL8RFpy6St38UdbxUQ+u+C2HRMsr2BzhVtQajYepuX6sCeqcqALygnzI HclsHCKiZSkOQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NXskP2DwJz6tmV; Thu, 15 Dec 2022 13:59:09 +0100 (CET) In-Reply-To: <87bko5ne9t.fsf@163.com> (Feng Shu's message of "Thu, 15 Dec 2022 18:37:50 +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:251079 Archived-At: Feng Shu writes: > 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! Marked as closed.