all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Jean-Christophe Helary <jean.christophe.helary@traduction-libre.org>
Cc: 39187@debbugs.gnu.org
Subject: bug#39187: Fwd: "Package refresh is already in progress, please wait..."
Date: Sun, 22 Mar 2020 12:40:36 +0100	[thread overview]
Message-ID: <87imiw4nyj.fsf@stefankangas.se> (raw)
In-Reply-To: <87iml2f34b.fsf@marxist.se> (Stefan Kangas's message of "Thu, 23 Jan 2020 19:18:28 +0100")

Stefan Kangas <stefan@marxist.se> 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.
> [...]
>> I think the fix here is simply to make sure that these processes times
>> out.
>
> Unless I'm missing something, it turns out that this is not that easy
> to do.  At least I couldn't figure out how to do it.  I found the
> following probably relevant bug:
>
>  bug#34607: url-retrieve-synchronously: TIMEOUT option value takes no effect
>
> For now at least, I'm giving up on finding a solution where url does
> the right thing and times out. 
>
> -----
>
> I see two ways forward:
>
> 1. Remove the warning and accept that we might launch several
>    processes doing the same update one after the other.  I would like
>    to avoid that on master, but it might be the least intrusive change
>    for emacs-27.
>   
> 2. When we run a refresh, save the current time.  If the user tries to
>    run another refresh, check if more than X seconds has elapsed since
>    the old one was started.  If it has been more than X seconds,
>    prompt the user to kill the old refresh and re-launch it.  It won't
>    be perfect, but it will be better than what we had before at least.
>
> Does anyone else have any ideas or preferences here?  Otherwise, I'll
> revert the change that exposed this bug on the emacs-27 branch, and
> implement the second change on master.

The more I've been looking at and thinking about this, the less
convinced I've been that it's a good idea to do something like (2).
It would not be a proper solution, but a hack, really.

The correct fix would be to make sure the connection times out.  But
I'm not sure that it's worth going deep into the guts of url.el right
now.

Lars has been working on a replacement library (with-url) which AFAIU
he hopes to merge in the coming months.  Without having looked at it
in great detail, it seems to me that we should try to make package.el
use the with-url library once it's merged.  Hopefully, that means that
timeouts will work properly.  (Otherwise, we can fix it.)

Once timeouts work, it would then be easy to reintroduce the warning
about duplicate package refreshes.

I have consequently done (1) instead also on master: the commit is now
reverted and this warning removed.  Please test that it now works as
expected, and thank you for your patience.

Best regards,
Stefan Kangas





  parent reply	other threads:[~2020-03-22 11:40 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-18 10:59 "Package refresh is already in progress, please wait..." Jean-Christophe Helary
2020-01-18 13:20 ` Pankaj Jangid
2020-01-18 15:32   ` Amin Bandali
2020-01-18 15:47     ` Jean-Christophe Helary
2020-01-18 16:20 ` Stefan Kangas
2020-01-19  1:28   ` bug#39187: Fwd: " Jean-Christophe Helary
2020-01-19  1:55     ` Stefan Kangas
2020-01-19  9:09       ` Michael Albinus
2020-01-19 15:20         ` Eli Zaretskii
2020-01-20 12:36           ` Michael Albinus
2020-01-20 13:29             ` Stefan Kangas
2020-01-20 13:52               ` Michael Albinus
2020-01-23 18:18       ` Stefan Kangas
2020-02-09 20:33         ` Stefan Kangas
2020-02-09 21:41           ` Jean-Christophe Helary
2020-02-10 15:30             ` Stefan Kangas
2020-02-11  2:17               ` Jean-Christophe Helary
2020-02-11  5:55               ` Jean-Christophe Helary
2020-02-11  6:25                 ` Stefan Kangas
2020-02-11  6:38                   ` Jean-Christophe Helary
2020-03-22 11:40         ` Stefan Kangas [this message]
2020-04-08  1:22           ` Stefan Kangas
2020-04-08  1:50             ` Jean-Christophe Helary
2020-01-23 16:07   ` Stefan Kangas
2020-01-23 16:12     ` Jean-Christophe Helary

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=87imiw4nyj.fsf@stefankangas.se \
    --to=stefan@marxist.se \
    --cc=39187@debbugs.gnu.org \
    --cc=jean.christophe.helary@traduction-libre.org \
    /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.