From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Matt Armstrong Newsgroups: gmane.emacs.bugs Subject: bug#56877: 29.0.50; Built-in packages are not always package-installed-p Date: Mon, 01 Aug 2022 13:15:25 -0700 Message-ID: <87r11z4t5u.fsf@rfc20.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12051"; mail-complaints-to="usenet@ciao.gmane.io" To: 56877@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 01 22:16:26 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oIbpx-0002uQ-RF for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Aug 2022 22:16:26 +0200 Original-Received: from localhost ([::1]:60510 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIbpw-0005CJ-Up for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Aug 2022 16:16:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46040) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIbpa-0004w7-UX for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2022 16:16:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51954) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oIbpa-0000BH-M9 for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2022 16:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oIbpa-0002Sd-IG for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2022 16:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Matt Armstrong Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Aug 2022 20:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56877 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16593849499432 (code B ref -1); Mon, 01 Aug 2022 20:16:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Aug 2022 20:15:49 +0000 Original-Received: from localhost ([127.0.0.1]:41703 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIbpM-0002S3-Pf for submit@debbugs.gnu.org; Mon, 01 Aug 2022 16:15:49 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:47182) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIbpH-0002Rs-Vb for submit@debbugs.gnu.org; Mon, 01 Aug 2022 16:15:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45980) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIbpF-0004iV-Aw for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2022 16:15:41 -0400 Original-Received: from relay9-d.mail.gandi.net ([2001:4b98:dc4:8::229]:41753) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIbpC-00007b-Cn for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2022 16:15:41 -0400 Original-Received: (Authenticated sender: matt@rfc20.org) by mail.gandi.net (Postfix) with ESMTPSA id 7C965FF802 for ; Mon, 1 Aug 2022 20:15:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rfc20.org; s=gm1; t=1659384929; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=93C24KlGpYR0HndFRC1vfC3PTF7F4RmuTWblmv3Qiy0=; b=XT9wF7Yd+9RLpEQRYuRcU8al8Xo/N6i9acuw1NXLkMYNOsgTpiSkH+bbIE5fPNcOXlsXJN sNJwuXjxDXOzOd1MXYDAKquzQWna6HcKuf3Oc6dpqi4tgO9sr3vZhk9iuXdJj9hYHJNQ6j 6mR7tG08h9yRHfN8rbtVCgLjvDUvIC3p+As2hTMWCHUkzy/UbkG5/7PaaWAhK6dfMkHCGJ Tj8/SwPqew3bMeIbEPjCo5qurLPu6/fuTZQ36B82zRSrmHRYM79htkYsBaOqNn+4YQwvOl tOaGJehzIvfOMJ6d1bPjHunPT0NVAjvCepnkOUfyzV20FS00lx6tmGEGBJ9xPw== Original-Received: from matt by naz with local (Exim 4.96) (envelope-from ) id 1oIboz-0016bd-2D for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2022 13:15:25 -0700 Received-SPF: pass client-ip=2001:4b98:dc4:8::229; envelope-from=matt@rfc20.org; helo=relay9-d.mail.gandi.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:238465 Archived-At: Before `package--initialized' is set non-nil a call to (package-installed-p PACKAGE) returns nil for symbols naming built-in packages. After `package--initialized' is non-nil the same call returns non-nil. I discovered this by accident when I figured out this use-package form caused Emacs to contact GNU ELPA during startup: (use-package project :ensure t ;; stuff) For the above use-package calls (package-installed-p 'project), which returns nil. Use-package then attempts to install it using package.el, which causes network activity, etc., and then package.el decides that it is already installed. This repeats each time I start Emacs. There is code in `package-installed-p' that consults `package-activated-list' when `package--initalized' is non-nil. This is the code path I am exercising. We also have this FIXME: (defvar package-activated-list nil ;; FIXME: This should implicitly include all builtin packages. "List of the names of currently activated packages.") I have a fix prepared, which I will send once i have a bug number. Configured using: 'configure --with-native-compilation --with-pgtk' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS XIM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: ELisp/l Minor modes in effect: global-git-commit-mode: t magit-auto-revert-mode: t auto-revert-mode: t bug-reference-prog-mode: t msb-mode: t display-time-mode: t shell-dirtrack-mode: t auto-insert-mode: t keyfreq-autosave-mode: t keyfreq-mode: t savehist-mode: t icomplete-vertical-mode: t icomplete-mode: t editorconfig-mode: t which-key-mode: t electric-pair-mode: t override-global-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t temp-buffer-resize-mode: t auto-save-visited-mode: t Load-path shadows: ~/env/elisp/ol-notmuch hides /home/matt/.config/emacs/elpa/ol-notmuch-20220428.1337/ol-notmuch /home/matt/.config/emacs/elpa/transient-20220717.1713/transient hides /home/matt/git/emacs-build/lisp/transient Features: (ert ewoc debug backtrace shadow sort mail-extr magit-extras face-remap magit-submodule magit-obsolete magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log which-func imenu magit-diff git-commit log-edit magit-core magit-autorevert magit-margin magit-transient magit-process with-editor magit-mode transient magit-git magit-base magit-section crm dash compat-27 compat-26 compat make-mode emacsbug smerge-mode diff add-log vc-annotate vc-hg vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs log-view pcvs-util whitespace vc sh-script smie executable autorevert cl-print package-x dabbrev misearch multi-isearch pulse color xref vc-git diff-mode vc-dispatcher bug-reference shortdoc benchmark help-fns radix-tree textsec uni-scripts idna-mapping ucs-normalize uni-confusable textsec-check protbuf msb time copyright editorconfig-core editorconfig-core-handle editorconfig-fnmatch cus-edit pp cus-start cus-load org-element avl-tree generator ol-w3m ol-rmail ol-mhe ol-irc ol-info org-habit org-agenda org-refile ol-gnus nnselect gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum gnus-group gnus-undo gnus-start gnus-dbus dbus gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range gnus-win ol-eww eww xdg url-queue thingatpt shr pixel-fill kinsoku url-file url-dired svg xml dom mm-url gnus nnheader range wid-edit ol-doi org-link-doi ol-docview doc-view filenotify jka-compr image-mode exif ol-bibtex ol-bbdb server dirtrack ob-shell shell ob-ruby ob-python python ob-dot org-protocol 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 org-version ob-emacs-lisp ob-core ob-eval org-table oc-basic bibtex iso8601 org-keys oc org-loaddefs find-func cal-menu calendar cal-loaddefs ol-notmuch ol org-compat org-macs format-spec skeleton autoinsert advice keyfreq project finder-inf mm-archive message sendmail yank-media dired dired-loaddefs rfc822 mml mml-sec epa derived gnus-util text-property-search time-date mailabbrev gmm-utils mailheader mm-decode mm-bodies mm-encode mail-utils gnutls network-stream url-cache url-http url-auth mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr url-gw nsm puny epg rfc6068 epg-config edmacro kmacro savehist icomplete comp comp-cstr warnings icons rx editorconfig modus-operandi-theme modus-themes which-key package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source eieio eieio-core password-cache json subr-x map byte-opt url-vars cl-macs gv cl-extra help-mode cl-seq elec-pair use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key easy-mmode use-package-core cl-loaddefs cl-lib bytecomp byte-compile cconv info bazel-autoloads clang-format+-autoloads clang-format-autoloads cmake-mode-autoloads d-mode-autoloads debbugs-autoloads editorconfig-autoloads eglot-autoloads elpy-autoloads company-autoloads exec-path-from-shell-autoloads flymake-ruby-autoloads flymake-easy-autoloads flymake-yamllint-autoloads go-mode-autoloads google-c-style-autoloads graphviz-dot-mode-autoloads highlight-indentation-autoloads magit-autoloads git-commit-autoloads magit-section-autoloads dash-autoloads markdown-mode-autoloads meson-mode-autoloads modus-themes-autoloads nixpkgs-fmt-autoloads ol-notmuch-autoloads notmuch-autoloads orderless-autoloads org-drill-autoloads persist-autoloads pylint-autoloads pyvenv-autoloads s-autoloads shfmt-autoloads reformatter-autoloads transient-autoloads use-package-autoloads bind-key-autoloads vertico-autoloads which-key-autoloads with-editor-autoloads compat-autoloads yaml-mode-autoloads yasnippet-autoloads rmc iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/pgtk-win pgtk-win term/common-win pgtk-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine 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 emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo gtk pgtk lcms2 multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 1041704 138279) (symbols 48 41342 108) (strings 32 237540 12847) (string-bytes 1 6538892) (vectors 16 112331) (vector-slots 8 2502178 111733) (floats 8 749 1306) (intervals 56 26923 3648) (buffers 992 42))