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.
Full log
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
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.