bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#59728: 30.0.50; package-vc does not handle package-quickstart


From: Philip Kaludercic
Subject: bug#59728: 30.0.50; package-vc does not handle package-quickstart
Date: Sat, 10 Dec 2022 09:01:37 +0000

Matt Armstrong <matt@rfc20.org> writes:

> Philip Kaludercic <philipk@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.
>
> From b74f1ac29f6427094a6beb15a6a0227f750281c3 Mon Sep 17 00:00:00 2001
> From: Matt Armstrong <matt@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)))

Sorry for the delay, I've tested the patch and it seems fine.  It has
been pushed to the emacs-29 branch.

Thanks!





reply via email to

[Prev in Thread] Current Thread [Next in Thread]