Subject: bug#39187: Fwd: "Package refresh is already in progress, please wait..."

From: Stefan Kangas <[email-masked]>
Date: Sun, 19 Jan 2020 02:55:37 +0100

Jean-Christophe Helary <[email-masked]>
writes:

> From: Stefan Kangas <[email-masked]>
> Subject: Re: "Package refresh is already in progress, please wait..."
> Date: January 19, 2020 1:20:42 JST
> To: Jean-Christophe Helary <[email-masked]>
> Cc: Help Gnu Emacs mailing list <[email-masked]>
>
> Jean-Christophe Helary <[email-masked]> writes:
>
> > It looks like emacs does not properly handle package refreshes when
> > the internet connection has been killed in the middle of an
> > refresh.
> > 
> > I often get this message in that case and I can't call package
> > until I actually kill emacs and restart it.

This is indeed a pretty bad bug.  Thank you for bringing it to our
attention.

For reference, here is the discussion about this on help-gnu-emacs:

    https://lists.gnu.org/archive/html/help-gnu-emacs/2020-01/msg00119.html

> That's a bug which was almost certainly introduced in a6d87ea045 by
> yours truly.  Could you please file a new bug report by running M-x
> report-emacs-bug or emailing [email-masked]?  Please include a
> reference to this thread.

I think the fix here is simply to make sure that these processes times
out.

I will look into this, but that should not stop anyone else from
looking into it if they feel so inclined.  Please also if anyone has a
better idea for how to fix it, feel free to share it.

Best regards,
Stefan Kangas

PS.  Is there a way to mark this as blocking Emacs 27.1?  I don't
think we should release a pre-test with this issue.

PS2.  If we can't find a fix in time before the pre-release, it is
better to back out commit a6d87ea045 on the release branch.  (We could
then leave it on master and fix it there, I think.)  But that that
will hopefully not be necessary.