Subject: bug#43800: 28.0.50; Package already install but still connecting to MELPA at start

From: Stefan Kangas <[email-masked]>
Date: Sun, 15 Nov 2020 19:19:45 -0800

Pankaj Jangid <[email-masked]> writes:

>> So, basically you're saying that
>>
>> (package-installed-p 'flymake)
>>
>> returns nil, but flymake is installed?
>
> Yes. And more info on this.
>
> 1. Launch fresh emacs instance
> 2. (package-installed-p 'flymake)
>    ⇒ nil
> 3. M-x package-refresh-contents
>    ;; wait for completion
>    (package-installed-p 'flymake)
>    ⇒ nil
> 4. M-x list-packages
>    ;; wait for completion
>    (package-installed-p 'flymake)
>    ⇒ t

Could you please provide a recipe to reproduce this bug, starting from
emacs -Q?  I tried the following on current master and Emacs 27:

0. emacs -Q
1. Evaluate:
(progn
  (package-initialize)
  (package-installed-p 'flymake))