From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Matt Armstrong Newsgroups: gmane.emacs.bugs Subject: bug#59728: 30.0.50; package-vc does not handle package-quickstart Date: Wed, 30 Nov 2022 16:14:53 -0800 Message-ID: <87bkoo7zeq.fsf@rfc20.org> References: <87iliw8f55.fsf@rfc20.org> <87y1rsw76q.fsf@posteo.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29674"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59728@debbugs.gnu.org, stefan monnier To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 01 01:16: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 1p0XFg-0007WX-PT for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 01 Dec 2022 01:16:32 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p0XFQ-0001Q0-Ai; Wed, 30 Nov 2022 19:16:16 -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 1p0XFC-0001PY-Ju for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2022 19: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 1p0XFC-0006BL-BS for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2022 19:16:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p0XFB-0005jQ-R2 for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2022 19:16:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Matt Armstrong Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Dec 2022 00:16:01 +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.166985372422023 (code B ref 59728); Thu, 01 Dec 2022 00:16:01 +0000 Original-Received: (at 59728) by debbugs.gnu.org; 1 Dec 2022 00:15:24 +0000 Original-Received: from localhost ([127.0.0.1]:35964 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0XEZ-0005j9-L4 for submit@debbugs.gnu.org; Wed, 30 Nov 2022 19:15:24 -0500 Original-Received: from relay3-d.mail.gandi.net ([217.70.183.195]:46707) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0XEI-0005iP-9G for 59728@debbugs.gnu.org; Wed, 30 Nov 2022 19:15:22 -0500 Original-Received: (Authenticated sender: matt@rfc20.org) by mail.gandi.net (Postfix) with ESMTPSA id 3E2C560002; Thu, 1 Dec 2022 00:14:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rfc20.org; s=gm1; t=1669853697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=dvT3BqfkibxcGTkNBO5E/WPzMataUAss59P9fgEvfFg=; b=GOXXMeThfxfhRBeXVQgH/Rt1BI/wLrzS7qBC+3yNevsvVyv3cFkFkwh5/kbPKlgxXne/FG ghL1ahcj6dTI1vDNbu+mI4vsl0ta6MUbcjxx/txKYFahibH8Z8mm8RTF02c9/kcq8An/Gb 71egAjZVyFER+PcoqZVezX7R56ZXduPTAuxw1NkshajJ3/Ag592oODdZFUhaLkJ4gtPDnb d76v9iA26DEZasA10h+MRkgJbtZhwyTGF7XJh+YX6a1mxjHR23xCNMvqQypgzG1UUnrKiI NFth58X8ipxZQ/Lrp8Ck4Ouc5LJ8HItdNqpGYSyQYlUatxtzFhdVU6PfjZC6wQ== Original-Received: by mac-mini.lan (Postfix) with ESMTPS id 5E97C3CF89; Wed, 30 Nov 2022 16:14:53 -0800 (PST) Original-Received: by naz.lan (Postfix, from userid 1000) id 3AB0A43DC006; Wed, 30 Nov 2022 16:14:53 -0800 (PST) In-Reply-To: <87y1rsw76q.fsf@posteo.net> 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:249586 Archived-At: --=-=-= Content-Type: text/plain 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. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0002-Refresh-the-package-quickstart-file-in-package-vc.patch >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))) -- 2.35.1 --=-=-=--