GNU bug report logs - #59728
30.0.50; package-vc does not handle package-quickstart

Previous Next

Package: emacs;

Reported by: Matt Armstrong <matt <at> rfc20.org>

Date: Wed, 30 Nov 2022 18:36:02 UTC

Severity: normal

Found in version 30.0.50

Fixed in version 29.1

Done: Philip Kaludercic <philipk <at> posteo.net>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 59728 <at> debbugs.gnu.org (full text, mbox):

From: Matt Armstrong <matt <at> rfc20.org>
To: Philip Kaludercic <philipk <at> posteo.net>
Cc: 59728 <at> debbugs.gnu.org, stefan monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#59728: 30.0.50; package-vc does not handle package-quickstart
Date: Wed, 30 Nov 2022 16:14:53 -0800
[Message part 1 (text/plain, inline)]
Philip Kaludercic <philipk <at> posteo.net> 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.

[0002-Refresh-the-package-quickstart-file-in-package-vc.patch (text/x-diff, inline)]
From b74f1ac29f6427094a6beb15a6a0227f750281c3 Mon Sep 17 00:00:00 2001
From: Matt Armstrong <matt <at> rfc20.org>
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


This bug report was last modified 2 years and 222 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.