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#59087: 29.0.50; package-vc-update error Date: Fri, 18 Nov 2022 15:22:07 +0000 Message-ID: <878rk8i8yo.fsf@posteo.net> References: <87v8nr333x.fsf@163.com> <874jv13h6c.fsf@posteo.net> <878rkdkmqe.fsf@163.com> <874jv01ray.fsf@posteo.net> <87fsejybcz.fsf@163.com> <871qq38g54.fsf@posteo.net> <87fsejcdm2.fsf@163.com> <87sfijnlce.fsf@posteo.net> <877czvcaz3.fsf@163.com> <87k03vnjgf.fsf@posteo.net> <87v8newgve.fsf@163.com> <87r0y1inku.fsf@posteo.net> <874juxgcqd.fsf@163.com> <871qq0k2o9.fsf@posteo.net> <87sfig7a4o.fsf@163.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11709"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59087@debbugs.gnu.org To: Feng Shu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 18 16:23:22 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 1ow3D8-0002px-8i for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 18 Nov 2022 16:23:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ow3Cs-0005ou-HT; Fri, 18 Nov 2022 10:23:08 -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 1ow3Co-0005ln-Bj for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2022 10:23: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 1ow3Co-0004mP-0K for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2022 10:23:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ow3Cn-0002zD-T2 for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2022 10:23:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Nov 2022 15:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59087 X-GNU-PR-Package: emacs Original-Received: via spool by 59087-submit@debbugs.gnu.org id=B59087.166878493911417 (code B ref 59087); Fri, 18 Nov 2022 15:23:01 +0000 Original-Received: (at 59087) by debbugs.gnu.org; 18 Nov 2022 15:22:19 +0000 Original-Received: from localhost ([127.0.0.1]:37968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ow3C7-0002y3-15 for submit@debbugs.gnu.org; Fri, 18 Nov 2022 10:22:19 -0500 Original-Received: from mout02.posteo.de ([185.67.36.66]:46021) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ow3C4-0002xo-6w for 59087@debbugs.gnu.org; Fri, 18 Nov 2022 10:22:17 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 30B3D240104 for <59087@debbugs.gnu.org>; Fri, 18 Nov 2022 16:22:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1668784930; bh=Z7m630zQgfjo99HVQMhlxaez/YQTdEZam1fYOArUoRI=; h=From:To:Cc:Subject:Date:From; b=dJujIK2Cc5K1bif6J+mVSRCw0QvSVyOPK2DqucUepNZhIUg8ksf0uqYeJv9qf8mHV 9jdIfB2Y/q1cQTRZ4rDWCCTOXiIiBYSUF/xL+jdqT9dIPWiT6lsFyMuiAjl8Y38tlq V+hcaqB8izsdZT844XIr8Md2QKt5Na5OHRpPY7YDWuADHcsSNMx2/k15F9/CQUD0Ym IFXNGX0NPN2xg5SG1s1lMPub1JwuwDE8XIrP8SayMPsNF/AFX/4BQo3qd0w9zg31Sg ne8wp/hjZE2vzVMwsgCLdw6UwetMvhjhgaMXRvB62kuIpbQQ7Fe4ZyluvmJhumnpUp FogsZsGRQtP1w== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NDL9q0s87z6tnq; Fri, 18 Nov 2022 16:22:06 +0100 (CET) In-Reply-To: <87sfig7a4o.fsf@163.com> (Feng Shu's message of "Fri, 18 Nov 2022 19:52:23 +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:248252 Archived-At: Feng Shu writes: > Philip Kaludercic writes: > >> Feng Shu writes: >> >>> Philip Kaludercic writes: >>> >>>> Feng Shu writes: >>>> >>>>> I have found another issue: >>>>> >>>>> If I run package-update when emacs first start, it will show error: >>>>> >>>>> package-update: Symbol=E2=80=99s function definition is void: package= -vc-update >>>> >>> >>> When I install another package, for example: cnfonts, package-update do >>> not show cnfonts, I need to reboot emacs. >> >> That is interesting, it the package listed in the Package List before >> restarting? > > I have installed cnfonts tar from melpa before, when I delete it, > package-update show cnfonts.=20 Ok, so it looks like the issue is in the following: --8<---------------cut here---------------start------------->8--- (seq-filter (lambda (elt) (or (let ((available (assq (car elt) package-archive-contents))) (and available (version-list-< (package-desc-version (cadr elt)) (package-desc-version (cadr available))))) (package-vc-p (cadr (assq (car elt) package-alist))))) package-alist) --8<---------------cut here---------------end--------------->8--- specifically the --8<---------------cut here---------------start------------->8--- (package-vc-p (cadr (assq (car elt) package-alist))) --8<---------------cut here---------------end--------------->8--- We store all package descriptions in `package-alist', but here we only check the first one (which is also the one I believe that is activated). But after restarting Emacs, package.el makes sure that VC packages are prioritised, so that is why the check does work later on. The question is, what package is enabled? I'd say that if after installation, you run M-x find-library and end up in the MELPA directory, then we would have to make up our mind of this is the right thing or not. But if the VC package is active, then we just have to make sure that it is inserted at the beginning of the list, and not at the end.