GNU bug report logs -
#19851
25.0.50; package-install-{file,from-buffer} broken
Previous Next
Reported by: Mark Oteiza <mvoteiza <at> udel.edu>
Date: Fri, 13 Feb 2015 00:42:02 UTC
Severity: normal
Tags: fixed
Found in version 25.0.50
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 19851 in the body.
You can then email your comments to 19851 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19851
; Package
emacs
.
(Fri, 13 Feb 2015 00:42:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Mark Oteiza <mvoteiza <at> udel.edu>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 13 Feb 2015 00:42:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
In GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw scroll bars)
of 2015-02-12 on logos
Repository revision: e39d96ebe4c342885433afc28232197ce398fe71
Hi,
These functions are broken on master. For instance,
1. ~ $ git clone http://mumble.net/~campbell/git/paredit.git
2. emacs -Q
3. M-x package-install-file RET ~/paredit RET
Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
package-install-from-buffer()
package-install-file("~/paredit/")
funcall-interactively(package-install-file "~/paredit/")
call-interactively(package-install-file record nil)
command-execute(package-install-file record)
execute-extended-command(nil "package-install-file" "package-install-fi")
funcall-interactively(execute-extended-command nil "package-install-file" "package-install-fi")
call-interactively(execute-extended-command nil nil)
command-execute(execute-extended-command)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19851
; Package
emacs
.
(Fri, 13 Feb 2015 01:06:02 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
On 12/02/15 at 07:41pm, Mark Oteiza wrote:
>
> In GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw scroll bars)
> of 2015-02-12 on logos
> Repository revision: e39d96ebe4c342885433afc28232197ce398fe71
>
> Hi,
>
> These functions are broken on master. For instance,
>
> 1. ~ $ git clone http://mumble.net/~campbell/git/paredit.git
> 2. emacs -Q
> 3. M-x package-install-file RET ~/paredit RET
>
> Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
> package-install-from-buffer()
> package-install-file("~/paredit/")
> funcall-interactively(package-install-file "~/paredit/")
> call-interactively(package-install-file record nil)
> command-execute(package-install-file record)
> execute-extended-command(nil "package-install-file" "package-install-fi")
> funcall-interactively(execute-extended-command nil "package-install-file" "package-install-fi")
> call-interactively(execute-extended-command nil nil)
> command-execute(execute-extended-command)
Nevermind, I think this is invalid--misleading at least. A better error
message would be good.
paredit just does not have a valid Version: header. Even after fixing
it, I was also getting a message like "no subdir alist in *temp*", but
I haven't pinned down the origin of that.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19851
; Package
emacs
.
(Sat, 14 Feb 2015 04:02:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 19851 <at> debbugs.gnu.org (full text, mbox):
> Nevermind, I think this is invalid--misleading at least. A better error
> message would be good.
Maybe package.el could/should take some of the code from
elpa/admin/archive-contents.el, since I think I've been a bit more
careful about error reporting there.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19851
; Package
emacs
.
(Mon, 09 Mar 2015 06:12:02 GMT)
Full text and
rfc822 format available.
Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):
On 12/02/15 at 08:04pm, Mark Oteiza wrote:
> Nevermind, I think this is invalid--misleading at least. A better error
> message would be good.
>
> paredit just does not have a valid Version: header. Even after fixing
> it, I was also getting a message like "no subdir alist in *temp*", but
> I haven't pinned down the origin of that.
Found it. It is from using package-install-file on a directory while
saveplace is enabled. Saveplace gets stuck. From emacs -Q:
1. mkdir /some/new/dir
2. Evaluate:
(setq-default save-place t)
(require 'saveplace)
(package-initialize)
3. M-x package-install-file RET /some/new/dir RET
"dired-current-directory: No subdir-alist in *temp*"
In order to quit emacs, one has to hack around kill-emacs-hook.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19851
; Package
emacs
.
(Mon, 15 Jun 2015 21:47:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 19851 <at> debbugs.gnu.org (full text, mbox):
> Found it. It is from using package-install-file on a directory while
> saveplace is enabled. Saveplace gets stuck. From emacs -Q:
>
> 1. mkdir /some/new/dir
> 2. Evaluate:
>
> (setq-default save-place t)
> (require 'saveplace)
> (package-initialize)
>
> 3. M-x package-install-file RET /some/new/dir RET
>
> "dired-current-directory: No subdir-alist in *temp*"
>
> In order to quit emacs, one has to hack around kill-emacs-hook.
Does this patch fix it for you?
diff --git a/lisp/saveplace.el b/lisp/saveplace.el
index fe54743..5bbcd79 100644
--- a/lisp/saveplace.el
+++ b/lisp/saveplace.el
@@ -158,6 +158,8 @@ (defun toggle-save-place (&optional parg) ;FIXME: save-place-local-mode!
\(setq-default save-place t)"
(interactive "P")
(if (not (or buffer-file-name (and (derived-mode-p 'dired-mode)
+ (boundp 'dired-subdir-alist)
+ dired-subdir-alist
(dired-current-directory))))
(message "Buffer `%s' not visiting a file or directory" (buffer-name))
(setq save-place (if parg
@@ -178,6 +180,8 @@ (defun save-place-to-alist ()
;; will be saved again when Emacs is killed.
(or save-place-loaded (load-save-place-alist-from-file))
(let* ((directory (and (derived-mode-p 'dired-mode)
+ (boundp 'dired-subdir-alist)
+ dired-subdir-alist
(dired-current-directory)))
(item (or buffer-file-name
(and directory
@@ -310,6 +314,8 @@ (defun save-places-to-alist ()
;; save-place checks buffer-file-name too, but we can avoid
;; overhead of function call by checking here too.
(and (or buffer-file-name (and (derived-mode-p 'dired-mode)
+ (boundp 'dired-subdir-alist)
+ dired-subdir-alist
(dired-current-directory)))
(save-place-to-alist))
(setq buf-list (cdr buf-list))))))
@@ -331,6 +337,8 @@ (defun save-place-dired-hook ()
"Position the point in a Dired buffer."
(or save-place-loaded (load-save-place-alist-from-file))
(let* ((directory (and (derived-mode-p 'dired-mode)
+ (boundp 'dired-subdir-alist)
+ dired-subdir-alist
(dired-current-directory)))
(cell (assoc (and directory
(expand-file-name (if (consp directory)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19851
; Package
emacs
.
(Mon, 15 Jun 2015 23:28:02 GMT)
Full text and
rfc822 format available.
Message #20 received at submit <at> debbugs.gnu.org (full text, mbox):
Juri Linkov <juri <at> linkov.net> writes:
>> Found it. It is from using package-install-file on a directory while
>> saveplace is enabled. Saveplace gets stuck. From emacs -Q:
>>
>> 1. mkdir /some/new/dir
>> 2. Evaluate:
>>
>> (setq-default save-place t)
>> (require 'saveplace)
>> (package-initialize)
>>
>> 3. M-x package-install-file RET /some/new/dir RET
>>
>> "dired-current-directory: No subdir-alist in *temp*"
>>
>> In order to quit emacs, one has to hack around kill-emacs-hook.
>
> Does this patch fix it for you?
>
> diff --git a/lisp/saveplace.el b/lisp/saveplace.el
> index fe54743..5bbcd79 100644
> --- a/lisp/saveplace.el
> +++ b/lisp/saveplace.el
> @@ -158,6 +158,8 @@ (defun toggle-save-place (&optional parg) ;FIXME: save-place-local-mode!
> \(setq-default save-place t)"
> (interactive "P")
> (if (not (or buffer-file-name (and (derived-mode-p 'dired-mode)
> + (boundp 'dired-subdir-alist)
> + dired-subdir-alist
> (dired-current-directory))))
> (message "Buffer `%s' not visiting a file or directory" (buffer-name))
> (setq save-place (if parg
> @@ -178,6 +180,8 @@ (defun save-place-to-alist ()
> ;; will be saved again when Emacs is killed.
> (or save-place-loaded (load-save-place-alist-from-file))
> (let* ((directory (and (derived-mode-p 'dired-mode)
> + (boundp 'dired-subdir-alist)
> + dired-subdir-alist
> (dired-current-directory)))
> (item (or buffer-file-name
> (and directory
> @@ -310,6 +314,8 @@ (defun save-places-to-alist ()
> ;; save-place checks buffer-file-name too, but we can avoid
> ;; overhead of function call by checking here too.
> (and (or buffer-file-name (and (derived-mode-p 'dired-mode)
> + (boundp 'dired-subdir-alist)
> + dired-subdir-alist
> (dired-current-directory)))
> (save-place-to-alist))
> (setq buf-list (cdr buf-list))))))
> @@ -331,6 +337,8 @@ (defun save-place-dired-hook ()
> "Position the point in a Dired buffer."
> (or save-place-loaded (load-save-place-alist-from-file))
> (let* ((directory (and (derived-mode-p 'dired-mode)
> + (boundp 'dired-subdir-alist)
> + dired-subdir-alist
> (dired-current-directory)))
> (cell (assoc (and directory
> (expand-file-name (if (consp directory)
Yes, thank you.
Though, with the recipe I gave here, I get again a trace like what I
pasted when opening with bug. This appears to be because "pkg-desc" in
package-install-from-buffer() is nil, so then
(package-desc-name nil) is an error
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19851
; Package
emacs
.
(Sat, 19 Dec 2015 19:22:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 19851 <at> debbugs.gnu.org (full text, mbox):
On 15/06/15 at 11:56pm, Juri Linkov wrote:
> > Found it. It is from using package-install-file on a directory while
> > saveplace is enabled. Saveplace gets stuck. From emacs -Q:
> >
> > 1. mkdir /some/new/dir
> > 2. Evaluate:
> >
> > (setq-default save-place t)
> > (require 'saveplace)
> > (package-initialize)
> >
> > 3. M-x package-install-file RET /some/new/dir RET
> >
> > "dired-current-directory: No subdir-alist in *temp*"
> >
> > In order to quit emacs, one has to hack around kill-emacs-hook.
>
> Does this patch fix it for you?
>
> diff --git a/lisp/saveplace.el b/lisp/saveplace.el
> index fe54743..5bbcd79 100644
> --- a/lisp/saveplace.el
> +++ b/lisp/saveplace.el
> @@ -158,6 +158,8 @@ (defun toggle-save-place (&optional parg) ;FIXME: save-place-local-mode!
> \(setq-default save-place t)"
> (interactive "P")
> (if (not (or buffer-file-name (and (derived-mode-p 'dired-mode)
> + (boundp 'dired-subdir-alist)
> + dired-subdir-alist
> (dired-current-directory))))
> (message "Buffer `%s' not visiting a file or directory" (buffer-name))
> (setq save-place (if parg
> @@ -178,6 +180,8 @@ (defun save-place-to-alist ()
> ;; will be saved again when Emacs is killed.
> (or save-place-loaded (load-save-place-alist-from-file))
> (let* ((directory (and (derived-mode-p 'dired-mode)
> + (boundp 'dired-subdir-alist)
> + dired-subdir-alist
> (dired-current-directory)))
> (item (or buffer-file-name
> (and directory
> @@ -310,6 +314,8 @@ (defun save-places-to-alist ()
> ;; save-place checks buffer-file-name too, but we can avoid
> ;; overhead of function call by checking here too.
> (and (or buffer-file-name (and (derived-mode-p 'dired-mode)
> + (boundp 'dired-subdir-alist)
> + dired-subdir-alist
> (dired-current-directory)))
> (save-place-to-alist))
> (setq buf-list (cdr buf-list))))))
> @@ -331,6 +337,8 @@ (defun save-place-dired-hook ()
> "Position the point in a Dired buffer."
> (or save-place-loaded (load-save-place-alist-from-file))
> (let* ((directory (and (derived-mode-p 'dired-mode)
> + (boundp 'dired-subdir-alist)
> + dired-subdir-alist
> (dired-current-directory)))
> (cell (assoc (and directory
> (expand-file-name (if (consp directory)
Could this patch be applied? I have been running with it for so long
that getting this bug again reminded me I forgot to apply it this last
time.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19851
; Package
emacs
.
(Tue, 22 Dec 2015 00:19:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 19851 <at> debbugs.gnu.org (full text, mbox):
> Could this patch be applied? I have been running with it for so long
> that getting this bug again reminded me I forgot to apply it this last
> time.
Thanks for the reminder, now fixed in emacs-25. Could this report be closed,
or there is another bug too?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19851
; Package
emacs
.
(Tue, 22 Dec 2015 17:51:01 GMT)
Full text and
rfc822 format available.
Message #29 received at 19851 <at> debbugs.gnu.org (full text, mbox):
On 22/12/15 at 02:15am, Juri Linkov wrote:
> > Could this patch be applied? I have been running with it for so long
> > that getting this bug again reminded me I forgot to apply it this last
> > time.
>
> Thanks for the reminder, now fixed in emacs-25.
Thank you.
> Could this report be closed, or there is another bug too?
A bug remains:
1. mkdir /tmp/foo
2. Evaluate:
(save-place-mode)
(package-initialize)
3. M-x package-install-file RET /tmp/foo RET
Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
package-install-from-buffer()
package-install-file("/tmp/foo")
funcall-interactively(package-install-file "/tmp/foo")
call-interactively(package-install-file record nil)
command-execute(package-install-file record)
execute-extended-command(nil "package-install-file" nil)
funcall-interactively(execute-extended-command nil "package-install-file" nil)
call-interactively(execute-extended-command nil nil)
command-execute(execute-extended-command)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19851
; Package
emacs
.
(Wed, 23 Dec 2015 00:55:02 GMT)
Full text and
rfc822 format available.
Message #32 received at 19851 <at> debbugs.gnu.org (full text, mbox):
> A bug remains:
>
> 1. mkdir /tmp/foo
> 2. Evaluate:
>
> (save-place-mode)
> (package-initialize)
Do you see the same bug without using save-place-mode?
> 3. M-x package-install-file RET /tmp/foo RET
I wonder why are you trying yo install a package from the empty directory?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19851
; Package
emacs
.
(Wed, 23 Dec 2015 16:29:01 GMT)
Full text and
rfc822 format available.
Message #35 received at 19851 <at> debbugs.gnu.org (full text, mbox):
On 23/12/15 at 02:51am, Juri Linkov wrote:
> > A bug remains:
> >
> > 1. mkdir /tmp/foo
> > 2. Evaluate:
> >
> > (save-place-mode)
> > (package-initialize)
>
> Do you see the same bug without using save-place-mode?
Oh, of course. Woops.
> > 3. M-x package-install-file RET /tmp/foo RET
>
> I wonder why are you trying yo install a package from the empty directory?
Just trying to break things is all.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19851
; Package
emacs
.
(Wed, 23 Dec 2015 18:13:02 GMT)
Full text and
rfc822 format available.
Message #38 received at 19851 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Yes. We should definitely have a better error message when that function is
invoked wrongly.
Things like "no .el files in this directory" or "this file lacks a version
header".
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19851
; Package
emacs
.
(Sat, 06 Aug 2016 20:35:01 GMT)
Full text and
rfc822 format available.
Message #41 received at 19851 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Mark Oteiza <mvoteiza <at> udel.edu> writes:
> On 23/12/15 at 02:51am, Juri Linkov wrote:
>> > A bug remains:
>> >
>> > 1. mkdir /tmp/foo
>> > 2. Evaluate:
>> >
>> > (save-place-mode)
>> > (package-initialize)
>>
>> Do you see the same bug without using save-place-mode?
>
> Oh, of course. Woops.
>
>> > 3. M-x package-install-file RET /tmp/foo RET
>>
>> I wonder why are you trying yo install a package from the empty directory?
>
> Just trying to break things is all.
So we just need a better error message here? Something like this:
[v1-0001-Improve-error-when-installing-non-package-dirs.patch (text/plain, inline)]
From dabd1cb2ffe3aed39f11d89f5ab1acab5b1d0426 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs <at> gmail.com>
Date: Sat, 25 Jun 2016 15:57:39 -0400
Subject: [PATCH v1] Improve error when installing non-package dirs
* lisp/emacs-lisp/package.el (package-dir-info): Throw meaningful error
when no file with package info is found (Bug #19851).
---
lisp/emacs-lisp/package.el | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index e721b55..f669c31 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1081,6 +1081,8 @@ package-dir-info
(setq files nil)
;; set the 'dir kind,
(setf (package-desc-kind info) 'dir))))
+ (unless info
+ (error "No .el files with package headers in `%s'" default-directory))
;; and return the info.
info))))
--
2.8.0
Added tag(s) fixed.
Request was from
npostavs <at> users.sourceforge.net
to
control <at> debbugs.gnu.org
.
(Sun, 21 Aug 2016 16:27:01 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 25.2, send any further explanations to
19851 <at> debbugs.gnu.org and Mark Oteiza <mvoteiza <at> udel.edu>
Request was from
npostavs <at> users.sourceforge.net
to
control <at> debbugs.gnu.org
.
(Sun, 21 Aug 2016 16:27:02 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, 19 Sep 2016 11:24:04 GMT)
Full text and
rfc822 format available.
bug unarchived.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sun, 04 Dec 2016 02:50:07 GMT)
Full text and
rfc822 format available.
bug Marked as fixed in versions 26.1.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sun, 04 Dec 2016 02:50:07 GMT)
Full text and
rfc822 format available.
bug No longer marked as fixed in versions 25.2.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sun, 04 Dec 2016 02:50:07 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
.
(Sun, 01 Jan 2017 12:24:17 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 171 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.