From: npostavs@users.sourceforge.net
To: Mark Oteiza <mvoteiza@udel.edu>
Cc: 19851@debbugs.gnu.org, Juri Linkov <juri@linkov.net>
Subject: bug#19851: 25.0.50; package-install-{file,from-buffer} broken
Date: Sat, 06 Aug 2016 16:34:31 -0400 [thread overview]
Message-ID: <87mvkp63hk.fsf@users.sourceforge.net> (raw)
In-Reply-To: <20151223162815.GA5052@holos> (Mark Oteiza's message of "Wed, 23 Dec 2015 11:28:15 -0500")
[-- Attachment #1: Type: text/plain, Size: 541 bytes --]
Mark Oteiza <mvoteiza@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:
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 914 bytes --]
From dabd1cb2ffe3aed39f11d89f5ab1acab5b1d0426 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@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
prev parent reply other threads:[~2016-08-06 20:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-13 0:41 bug#19851: 25.0.50; package-install-{file,from-buffer} broken Mark Oteiza
2015-02-13 1:04 ` Mark Oteiza
2015-02-14 4:01 ` Stefan Monnier
2015-03-09 6:10 ` Mark Oteiza
2015-06-15 20:56 ` Juri Linkov
2015-06-15 23:27 ` Mark Oteiza
2015-12-19 19:21 ` Mark Oteiza
2015-12-22 0:15 ` Juri Linkov
2015-12-22 17:50 ` Mark Oteiza
2015-12-23 0:51 ` Juri Linkov
2015-12-23 16:28 ` Mark Oteiza
2015-12-23 18:12 ` Artur Malabarba
2016-08-06 20:34 ` npostavs [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mvkp63hk.fsf@users.sourceforge.net \
--to=npostavs@users.sourceforge.net \
--cc=19851@debbugs.gnu.org \
--cc=juri@linkov.net \
--cc=mvoteiza@udel.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).