* bug#14718: 24.3.50; Endless loop in "package-read-all-archive-contents"
@ 2013-06-25 20:19 Sebastian Wiesner
2013-06-26 0:45 ` Stefan Monnier
0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Wiesner @ 2013-06-25 20:19 UTC (permalink / raw)
To: 14718
If a package is contained in two or more archives,
"package-read-all-archive-contents" hangs in an endless loop. For
instance, in "emacs -Q":
ELISP> package-archives
(("gnu" . "http://elpa.gnu.org/packages/"))
ELISP> (package-refresh-contents)
nil
ELISP> (add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
(("gnu" . "http://elpa.gnu.org/packages/")
("melpa" . "http://melpa.milkbox.net/packages/"))
ELISP> package-archives
(("gnu" . "http://elpa.gnu.org/packages/")
("melpa" . "http://melpa.milkbox.net/packages/"))
ELISP> (package-refresh-contents)
*** Eval error *** Quit during evaluation
The last invocation continues forever. "Quit during evaluation" is the
result of repeatedly pressing "C-g".
I inserted some "message" calls into functions called by
"package-refresh-contents", which indicate that the "while" loop at the
bottom of "package--add-to-archive-contents" is the root cause. This
loop seems to continue forever if "package--add-to-archive-contents" is
invoked with a "package" which is already contained in another archive.
Inserting a "(message "DEBUG: Looping for %s" package)" at the beginning
of the body of this loop repeats this message a few thousand times
before C-g succeeds in interrupting the evaluation. In my case, this
was the "yasnippet" package which is contained in GNU as well as in
MELPA.
Apparently the test of this loop is wrong, but since I do not understand
what the loop is supposed to do, I can't say how it is wrong.
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#14718: 24.3.50; Endless loop in "package-read-all-archive-contents"
2013-06-25 20:19 bug#14718: 24.3.50; Endless loop in "package-read-all-archive-contents" Sebastian Wiesner
@ 2013-06-26 0:45 ` Stefan Monnier
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2013-06-26 0:45 UTC (permalink / raw)
To: Sebastian Wiesner; +Cc: 14718
> If a package is contained in two or more archives,
> "package-read-all-archive-contents" hangs in an endless loop. For
> instance, in "emacs -Q":
Duh! Not sure how the nil got lost when I copied the loop from
package-process-define-package.
I installed the patch below which should fix it,
Stefan
=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog 2013-06-25 16:13:49 +0000
+++ lisp/ChangeLog 2013-06-26 00:43:32 +0000
@@ -1,3 +1,8 @@
+2013-06-26 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * emacs-lisp/package.el (package--add-to-archive-contents): Add missing
+ nil terminate the loop (bug#14718).
+
2013-06-25 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/package.el: Use lexical-binding. Include obsolete
=== modified file 'lisp/emacs-lisp/package.el'
--- lisp/emacs-lisp/package.el 2013-06-25 16:13:49 +0000
+++ lisp/emacs-lisp/package.el 2013-06-26 00:42:56 +0000
@@ -3,6 +3,7 @@
;; Copyright (C) 2007-2013 Free Software Foundation, Inc.
;; Author: Tom Tromey <tromey@redhat.com>
+;; Daniel Hackney <dan@haxney.org>
;; Created: 10 Mar 2007
;; Version: 1.0.1
;; Keywords: tools
@@ -924,7 +925,8 @@
(version-list-<
version (package-desc-version (cadr existing-packages))))
(setq existing-packages (cdr existing-packages))
- (push pkg-desc (cdr existing-packages))))))))
+ (push pkg-desc (cdr existing-packages))
+ nil))))))
(defun package-download-transaction (packages)
"Download and install all the packages in PACKAGES.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-06-26 0:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-25 20:19 bug#14718: 24.3.50; Endless loop in "package-read-all-archive-contents" Sebastian Wiesner
2013-06-26 0:45 ` Stefan Monnier
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).