GNU bug report logs - #24643
25.1; Don't call package--ensure-init-file if initialized during startup

Previous Next

Package: emacs;

Reported by: Alex <agrambot <at> gmail.com>

Date: Sat, 8 Oct 2016 17:22:01 UTC

Severity: minor

Tags: fixed, patch

Merged with 25819

Found in version 25.1

Fixed in version 26.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24643 in the body.
You can then email your comments to 24643 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#24643; Package emacs. (Sat, 08 Oct 2016 17:22:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alex <agrambot <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 08 Oct 2016 17:22:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Alex <agrambot <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.1;
 Don't call package--ensure-init-file if initialized during startup
Date: Sat, 08 Oct 2016 11:19:58 -0600
'package-initialize' contains this if expression:

#+BEGIN_SRC elisp
  (if (equal user-init-file load-file-name)
      ;; If `package-initialize' is being called as part of loading
      ;; the init file, it's obvious we don't need to ensure-init.
      (setq package--init-file-ensured t
            ;; And likely we don't need to run it again after init.
            package-enable-at-startup nil)
    (package--ensure-init-file))
#+END_SRC

This calls 'package--ensure-init-file' even when a user may call
'package-initialize' in *one* of their init files, but not
'user-init-file'.

I think the condition should be replaced with:

#+BEGIN_SRC elisp
(not after-init-time)
#+END_SRC

Then it won't ensure when the user has initialized their packages
somewhere else.




Forcibly Merged 24643 25819. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Thu, 23 Feb 2017 02:27:02 GMT) Full text and rfc822 format available.

Added tag(s) patch. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Thu, 23 Feb 2017 02:27:02 GMT) Full text and rfc822 format available.

Added tag(s) fixed. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Sun, 26 Feb 2017 16:18:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 26.1, send any further explanations to 25819 <at> debbugs.gnu.org and frederik <at> ofb.net Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Sun, 26 Feb 2017 16:18:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 27 Mar 2017 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 143 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.