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#59728: 30.0.50; package-vc does not handle package-quickstart Date: Sat, 10 Dec 2022 09:01:37 +0000 Message-ID: <87pmcrhbta.fsf@posteo.net> References: <87iliw8f55.fsf@rfc20.org> <87y1rsw76q.fsf@posteo.net> <87bkoo7zeq.fsf@rfc20.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26606"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59728@debbugs.gnu.org, stefan monnier To: Matt Armstrong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 10 10:02:24 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 1p3vkV-0006hT-Ep for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Dec 2022 10:02:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3vkL-0001vg-Nw; Sat, 10 Dec 2022 04:02:15 -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 1p3vkB-0001vF-Dk for bug-gnu-emacs@gnu.org; Sat, 10 Dec 2022 04:02:07 -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 1p3vkA-0004WM-In for bug-gnu-emacs@gnu.org; Sat, 10 Dec 2022 04:02:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p3vkA-0006Lo-28 for bug-gnu-emacs@gnu.org; Sat, 10 Dec 2022 04:02: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: Sat, 10 Dec 2022 09:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59728 X-GNU-PR-Package: emacs Original-Received: via spool by 59728-submit@debbugs.gnu.org id=B59728.167066290324406 (code B ref 59728); Sat, 10 Dec 2022 09:02:02 +0000 Original-Received: (at 59728) by debbugs.gnu.org; 10 Dec 2022 09:01:43 +0000 Original-Received: from localhost ([127.0.0.1]:41573 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3vjr-0006LZ-09 for submit@debbugs.gnu.org; Sat, 10 Dec 2022 04:01:43 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]:59635) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3vjo-0006LR-H4 for 59728@debbugs.gnu.org; Sat, 10 Dec 2022 04:01:41 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id F404F24002E for <59728@debbugs.gnu.org>; Sat, 10 Dec 2022 10:01:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1670662895; bh=m1DQG+Vtw3VzaPN4cGi7oQSwmvQDqpMZj2w1+cYvn14=; h=From:To:Cc:Subject:Date:From; b=rL/Dvx5XtL75/KMmAVdcxQ45OjbHNBEkl5CohZ6If+VQob/QtnzyvE/OGKPfyXecI wBa7fULItY+LneC2pQRGVJMhL2++iSnml4MBAGPkP7u3a9uQv0q7VJrOc5h2TwfgF2 OiCMJSHztcY/kWz0Slb6du7A93rdk97iEtdU+NPBf3wkFOGMVkU9koYU3hCvn4xbEt zT4y5DzYTuQZMCu6QlK2i2Y9g6gVinQPf6YVyJ0Lxj/+YruBl8+2k4oiMxHLxP7tU+ yahoPQ74aD6UKRlIayAaJuyaQTRfWTH9JkwUdUXEesNHmqVBr7MqOYqbhtWTPQpBgD xH0k7AX6myDFA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NThhZ0gcmz9rxR; Sat, 10 Dec 2022 10:01:33 +0100 (CET) In-Reply-To: <87bkoo7zeq.fsf@rfc20.org> (Matt Armstrong's message of "Wed, 30 Nov 2022 16:14:53 -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:250497 Archived-At: Matt Armstrong writes: > Philip Kaludercic writes: > >> The central function here is `package-vc--unpack-1' so the following >> patch should take care of that: >> >> diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el >> index a4520ab800..5f7674190b 100644 >> --- a/lisp/emacs-lisp/package-vc.el >> +++ b/lisp/emacs-lisp/package-vc.el >> @@ -433,7 +433,8 @@ package-vc--unpack-1 >> (car load-path)))) >> (current-buffer)) >> (buffer-string)) >> - nil (expand-file-name auto-name pkg-dir)))) >> + nil (expand-file-name auto-name pkg-dir))) >> + (package-quickstart-refresh)) >> >> ;; Generate package file >> (package-vc--generate-description-file pkg-desc pkg-file) >> >> However I am uncertain if this is too aggressive? I don't have the time >> to test it properly right now, but could try this (or some variation >> thereof) and tell me if it addresses the issue? > > I moved the call to `package-quickstart-refresh' down, as it byte > compiles the autoloads and judging from other comments in this function, > and also discussion in bug#59707, that is best done after the new > version of the package is loaded. > > Also, the two `package--quickstart-maybe-refresh' calls in package.el > are just after a `package--save-selected-packages' call, so I did the > same here. > > The seems to work fine in my manual testing. Thanks for the tip! > > As for whether this is too aggressive, I'm not sure. Seems about as > aggressive as package.el is today. > > From b74f1ac29f6427094a6beb15a6a0227f750281c3 Mon Sep 17 00:00:00 2001 > From: Matt Armstrong > Date: Wed, 30 Nov 2022 15:58:07 -0800 > Subject: [PATCH 2/2] Refresh the package quickstart file in package-vc > > * lisp/emacs-lisp/package-vc.el (package-vc--unpack-1): Call > `package--quickstart-maybe-refresh', just as > `package-install-from-buffer' does. (bug#59728) > --- > lisp/emacs-lisp/package-vc.el | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el > index a4520ab800..04b4c81c13 100644 > --- a/lisp/emacs-lisp/package-vc.el > +++ b/lisp/emacs-lisp/package-vc.el > @@ -464,6 +464,7 @@ package-vc--unpack-1 > (package--save-selected-packages > (cons (package-desc-name pkg-desc) > package-selected-packages)) > + (package--quickstart-maybe-refresh) > > ;; Confirm that the installation was successful > (let ((main-file (package-vc--main-file pkg-desc))) Sorry for the delay, I've tested the patch and it seems fine. It has been pushed to the emacs-29 branch. Thanks!