Subject: bug#19864: 25.0.50; package-initialize is no more starting

From: Bastien <[email-masked]>
Date: Sat, 14 Feb 2015 08:21:56 +0100

Hi Thierry,

Thierry Volpiatto <[email-masked]> writes:

> Actually to start emacs-25 I have to advice `package-initialize' to set
> `package--initialized' before.

Yes, I reported this here:
http://article.gmane.org/gmane.emacs.diffs/129142

See the attached patch.

Can you double check it's correct for you?
CC'ing Artur as he may want to double check too.

Thanks,

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index d8b4595..22676ae 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1147,7 +1147,9 @@ If successful, set `package-archive-contents'."
     (package-read-archive-contents (car archive)))
   ;; Build compat table.
   (setq package--compatibility-table (make-hash-table :test 'eq))
-  (package--mapc #'package--add-to-compatibility-table))
+  ;; Pretend package is initialized when reading for the first time.
+  (let ((package--initialized t))
+    (package--mapc #'package--add-to-compatibility-table)))
 
 (defun package-read-archive-contents (archive)
   "Re-read archive contents for ARCHIVE.

-- 
 Bastien