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

From: Pankaj Jangid <[email-masked]>
Date: Mon, 05 Oct 2020 21:53:46 +0530

On Mon, Oct 05 2020, Lars Ingebrigtsen wrote:

>> (defun my/flymake-setup ()
>>   "Initialize flymake from elpa."
>>   (defvar my/pkgs '(flymake))
>>
>>   (let (ulist)
>>     (dolist (pkg my/pkgs ulist)
>>       (unless (package-installed-p pkg)
>> 	(setq ulist (cons pkg ulist))))
>
> 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