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 00:09:40 +0530

This is working fine on emacs-27 branch. But the issue is occuring only
on ‘master’.

In my ~/.emacs.d/init.d, I have (require 'init-flymake). And I've set
load-path before that using following statement,

(eval-and-compile
  (add-to-list 'load-path (expand-file-name "lisp" user-emacs-directory)))

And my ~/.emacs.d/lisp/init-flymake.el has following content,

--8<---------------cut here---------------start------------->8---
(require 'package)

(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))))
    (unless (null ulist)
      (package-refresh-contents)
      (dolist (pkg ulist)
	(package-install pkg)))))

(my/flymake-setup)

(require 'flymake)
(global-set-key (kbd "M-n") #'flymake-goto-next-error)
(global-set-key (kbd "M-p") #'flymake-goto-prev-error)

(provide 'init-flymake)
--8<---------------cut here---------------end--------------->8---

Everytime I restart emacs, it connects to MELPA to download
flymake. Following are log entries from *Messages* buffer at the
beginning of emacs session.

--8<---------------cut here---------------start------------->8---
Importing package-keyring.gpg...done
Contacting host: melpa.org:443 [2 times]
Contacting host: elpa.gnu.org:443
Package refresh done
Contacting host: elpa.gnu.org:443
Generating autoloads for flymake.el...done
  INFO     Scraping files for flymake-autoloads.el...done
Wrote /Users/pankaj/.emacs.d/elpa/flymake-1.0.9/flymake-autoloads.el
Checking /Users/pankaj/.emacs.d/elpa/flymake-1.0.9... [3 times]
Source file ‘/Users/pankaj/.emacs.d/elpa/flymake-1.0.9/flymake.el’ newer than byte-compiled file; using older file
Wrote /Users/pankaj/.emacs.d/elpa/flymake-1.0.9/flymake.elc
Checking /Users/pankaj/.emacs.d/elpa/flymake-1.0.9...
Done (Total of 1 file compiled, 2 skipped)
Package ‘flymake’ installed.
Loading /Users/pankaj/.emacs.d/recentf...done
Cleaning up the recentf list...done (0 removed)
Loading /Users/pankaj/.emacs.d/custom.el (source)...done
Saving file /Users/pankaj/.emacs.d/custom.el...
Wrote /Users/pankaj/.emacs.d/custom.el
For information about GNU Emacs and the GNU system, type C-h C-a.
--8<---------------cut here---------------end--------------->8---

In GNU Emacs 28.0.50 (build 14, x86_64-apple-darwin19.6.0, NS appkit-1894.60 Version 10.15.7 (Build 19H2))
 of 2020-10-04 built on mb2.local
Repository revision: 0fe8ab79e7a2306b84e209cc4e90da1996da1cad
Repository branch: master
Windowing system distributor 'Apple', version 10.3.1894
System Description:  Mac OS X 10.15.7

Configured using:
 'configure LDFLAGS=-L/usr/local/opt/ruby/lib
 CPPFLAGS=-I/usr/local/opt/ruby/include
 PKG_CONFIG_PATH=:/usr/local/opt/sqlite/lib/pkgconfig:/usr/local/opt/libxml2/lib/pkgconfig:/usr/local/opt/openssl/lib/pkgconfig:/usr/local/opt/libffi/lib/pkgconfig:/usr/local/opt/ruby/lib/pkgconfig'

Configured features:
JPEG TIFF GIF PNG RSVG DBUS GLIB NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS NS MODULES THREADS JSON PDUMPER LCMS2

Important settings:
  value of $LC_CTYPE: UTF-8
  value of $LANG: en_IN.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Messages

Minor modes in effect:
  electric-pair-mode: t
  show-paren-mode: t
  global-semanticdb-minor-mode: t
  global-semantic-idle-scheduler-mode: t
  semantic-mode: t
  recentf-mode: t
  icomplete-mode: t
  which-key-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/Users/pankaj/.emacs.d/elpa/flymake-1.0.9/flymake hides /Users/pankaj/work/code/savannah/emacs/nextstep/Emacs.app/Contents/Resources/lisp/progmodes/flymake

Features:
(shadow sort mail-extr gnus-topic pop3 nndraft nnmh utf-7 nnml nnfolder
cl-extra epa-file gnus-agent gnus-srvr gnus-score score-mode nnvirtual
nntp gnus-cache .gnus nnir gnus-msg gnus-art mm-uu mml2015 mm-view
mml-smime smime dig gnus-sum shr kinsoku svg dom gnus-group gnus-undo
gnus-start gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7
netrc nnoo parse-time gnus-spec gnus-int gnus-range gnus-win gnus
nnheader emacsbug sendmail pulse xref vc-bzr vc-src vc-sccs vc-svn
vc-cvs vc-rcs vc vc-dispatcher project checkdoc help-mode
display-line-numbers elec-pair paren hideshow semantic/db-mode
semantic/idle semantic/analyze semantic/sort semantic/scope
semantic/analyze/fcn semantic/db eieio-base semantic/format ezimage
semantic/tag-ls semantic/find semantic/ctxt semantic/util-modes
semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local
cedet vc-git diff-mode cus-edit cus-start cus-load init server vtl cl
init-java init-kotlin init-elisp init-keys init-modeline init-looks
init-editorconfig init-speedbar init-recentf recentf tree-widget
wid-edit init-date-time solar cal-dst init-crypto init-browser
init-icomplete icomplete init-which-key which-key init-flycheck
init-flymake flymake-proc flymake pcase warnings compile autoload
radix-tree lisp-mnt finder-inf mm-archive gnutls network-stream url-http
url-gw nsm url-cache url-auth url url-proxy url-privacy url-expand
url-methods url-history url-cookie url-domsuf url-util mailcap
init-dired init-org org-indent org ob ob-tangle ob-ref ob-lob ob-table
ob-exp org-macro org-footnote org-src ob-comint org-pcomplete pcomplete
comint ansi-color ring org-list org-faces org-entities noutline outline
easy-mmode org-version ob-emacs-lisp ob-core ob-eval org-table ol
org-keys org-loaddefs find-func cal-menu calendar cal-loaddefs
org-compat advice org-macs init-erc erc-auth erc-join erc-goodies erc
erc-backend iso8601 thingatpt pp format-spec erc-loaddefs init-email
message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg
epg-config gnus-util rmail rmail-loaddefs text-property-search time-date
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util
ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader
init-ibuffer edmacro kmacro info early-init package easymenu browse-url
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win
ucs-normalize mule-util term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core term/tty-colors frame minibuffer cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads dbusbind
kqueue cocoa ns lcms2 multi-tty make-network-process emacs)

Memory information:
((conses 16 525435 39165)
 (symbols 48 33163 1)
 (strings 32 132794 4350)
 (string-bytes 1 3994936)
 (vectors 16 47812)
 (vector-slots 8 608090 31804)
 (floats 8 605 378)
 (intervals 56 812 89)
 (buffers 992 30))

-- 
Pankaj Jangid

GnuPG Fingerprint => 0B62 7424 3B26 A911 052A  DDE6 7C95 6E6F F858 7689