From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.bugs Subject: bug#19864: 25.0.50; package-initialize is no more starting Date: Sat, 14 Feb 2015 09:12:26 +0100 Organization: Emacs Helm Message-ID: <87mw4gnc7p.fsf@gmail.com> References: <87h9uphshx.fsf@gmail.com> <87fva9ufe3.fsf@altern.org> <87d25dhrkl.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1423901606 12243 80.91.229.3 (14 Feb 2015 08:13:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 14 Feb 2015 08:13:26 +0000 (UTC) To: 19864@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 14 09:13:14 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YMXqi-0006zf-NG for geb-bug-gnu-emacs@m.gmane.org; Sat, 14 Feb 2015 09:13:12 +0100 Original-Received: from localhost ([::1]:59066 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMXqh-0007W3-Sr for geb-bug-gnu-emacs@m.gmane.org; Sat, 14 Feb 2015 03:13:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58064) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMXqd-0007UM-W4 for bug-gnu-emacs@gnu.org; Sat, 14 Feb 2015 03:13:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YMXqY-0000pa-Sx for bug-gnu-emacs@gnu.org; Sat, 14 Feb 2015 03:13:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51419) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMXqY-0000pW-PS for bug-gnu-emacs@gnu.org; Sat, 14 Feb 2015 03:13:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YMXqY-00073i-Fy for bug-gnu-emacs@gnu.org; Sat, 14 Feb 2015 03:13:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <87h9uphshx.fsf@gmail.com> Resent-From: Thierry Volpiatto Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Feb 2015 08:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19864 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.142390156927115 (code B ref -1); Sat, 14 Feb 2015 08:13:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Feb 2015 08:12:49 +0000 Original-Received: from localhost ([127.0.0.1]:42659 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YMXqL-00073G-7v for submit@debbugs.gnu.org; Sat, 14 Feb 2015 03:12:49 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:56295) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YMXqJ-000731-6T for submit@debbugs.gnu.org; Sat, 14 Feb 2015 03:12:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YMXqC-0000oR-UL for submit@debbugs.gnu.org; Sat, 14 Feb 2015 03:12:42 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:38569) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMXqC-0000oN-R5 for submit@debbugs.gnu.org; Sat, 14 Feb 2015 03:12:40 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58012) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMXqB-0007Td-Fz for bug-gnu-emacs@gnu.org; Sat, 14 Feb 2015 03:12:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YMXq6-0000n7-Dq for bug-gnu-emacs@gnu.org; Sat, 14 Feb 2015 03:12:39 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:37446) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMXq6-0000n3-6O for bug-gnu-emacs@gnu.org; Sat, 14 Feb 2015 03:12:34 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YMXq3-0006fS-So for bug-gnu-emacs@gnu.org; Sat, 14 Feb 2015 09:12:31 +0100 Original-Received: from lbe83-2-78-243-104-167.fbx.proxad.net ([78.243.104.167]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 14 Feb 2015 09:12:31 +0100 Original-Received: from thierry.volpiatto by lbe83-2-78-243-104-167.fbx.proxad.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 14 Feb 2015 09:12:31 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 72 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: lbe83-2-78-243-104-167.fbx.proxad.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:9c66H53hMdN2s71Th/LhPEHGvak= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:99361 Archived-At: Thierry Volpiatto writes: > Bastien writes: > >> Hi Thierry, >> >> Thierry Volpiatto 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. > > Looks more like a work around, (i.e what's package--initialized utility > if we have to let-bound it to be able to run code) Arthur will decide > what to do. Here a patch that set package--initialized when package-archive-contents is feeded and then setup package--compatibility-table. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index d8b4595..f7b9ef9 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1139,13 +1139,17 @@ Will throw an error if the archive version is too new." (car contents) package-archive-version)) (cdr contents)))))) -(defun package-read-all-archive-contents () +(defun package-read-all-archive-contents (&optional no-compat-table) "Re-read `archive-contents', if it exists. If successful, set `package-archive-contents'." (setq package-archive-contents nil) (dolist (archive package-archives) (package-read-archive-contents (car archive))) ;; Build compat table. + (unless no-compat-table + (package--build-compat-table))) + +(defun package--build-compat-table () (setq package--compatibility-table (make-hash-table :test 'eq)) (package--mapc #'package--add-to-compatibility-table)) @@ -1738,11 +1742,14 @@ If optional arg NO-ACTIVATE is non-nil, don't activate packages." (interactive) (setq package-alist nil) (package-load-all-descriptors) - (package-read-all-archive-contents) + (package-read-all-archive-contents t) + ;; Decide package is initialized when + ;; `package-archive-contents' is feeded. + (setq package--initialized t) + (package--build-compat-table) (unless no-activate (dolist (elt package-alist) - (package-activate (car elt)))) - (setq package--initialized t)) + (package-activate (car elt))))) (defun package--add-to-compatibility-table (pkg) "If PKG is compatible (without dependencies), add to the compatibility table. -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997