all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Matt Armstrong <matt@rfc20.org>
To: Philip Kaludercic <philipk@posteo.net>
Cc: 59728@debbugs.gnu.org, stefan monnier <monnier@iro.umontreal.ca>
Subject: bug#59728: 30.0.50; package-vc does not handle package-quickstart
Date: Wed, 30 Nov 2022 16:14:53 -0800	[thread overview]
Message-ID: <87bkoo7zeq.fsf@rfc20.org> (raw)
In-Reply-To: <87y1rsw76q.fsf@posteo.net>

[-- Attachment #1: Type: text/plain, Size: 1525 bytes --]

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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-Refresh-the-package-quickstart-file-in-package-vc.patch --]
[-- Type: text/x-diff, Size: 944 bytes --]

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)))
-- 
2.35.1


  reply	other threads:[~2022-12-01  0:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-30 18:35 bug#59728: 30.0.50; package-vc does not handle package-quickstart Matt Armstrong
2022-11-30 19:53 ` Philip Kaludercic
2022-12-01  0:14   ` Matt Armstrong [this message]
2022-12-10  9:01     ` Philip Kaludercic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bkoo7zeq.fsf@rfc20.org \
    --to=matt@rfc20.org \
    --cc=59728@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=philipk@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.