From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#19851: 25.0.50; package-install-{file,from-buffer} broken Date: Sat, 06 Aug 2016 16:34:31 -0400 Message-ID: <87mvkp63hk.fsf@users.sourceforge.net> References: <87lhk2ej84.fsf@udel.edu> <20150213010449.GA5865@holos> <20150309061049.GA10717@holos> <87wpz5zyot.fsf@mail.linkov.net> <20151219192120.GA5491@holos> <87h9jbbap8.fsf@mail.linkov.net> <20151222175012.GA1586@holos> <87vb7q81mi.fsf@mail.linkov.net> <20151223162815.GA5052@holos> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1470515726 28958 195.159.176.226 (6 Aug 2016 20:35:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 6 Aug 2016 20:35:26 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (gnu/linux) Cc: 19851@debbugs.gnu.org, Juri Linkov To: Mark Oteiza Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 06 22:35:22 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bW8JP-000629-UJ for geb-bug-gnu-emacs@m.gmane.org; Sat, 06 Aug 2016 22:35:16 +0200 Original-Received: from localhost ([::1]:50510 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bW8JM-0006bb-PG for geb-bug-gnu-emacs@m.gmane.org; Sat, 06 Aug 2016 16:35:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bW8JG-0006Zo-DU for bug-gnu-emacs@gnu.org; Sat, 06 Aug 2016 16:35:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bW8JC-0004al-7L for bug-gnu-emacs@gnu.org; Sat, 06 Aug 2016 16:35:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60899) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bW8JC-0004ae-3G for bug-gnu-emacs@gnu.org; Sat, 06 Aug 2016 16:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bW8JB-0002zx-Py for bug-gnu-emacs@gnu.org; Sat, 06 Aug 2016 16:35:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Aug 2016 20:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19851 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19851-submit@debbugs.gnu.org id=B19851.147051567211482 (code B ref 19851); Sat, 06 Aug 2016 20:35:01 +0000 Original-Received: (at 19851) by debbugs.gnu.org; 6 Aug 2016 20:34:32 +0000 Original-Received: from localhost ([127.0.0.1]:58196 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bW8Ii-0002z8-CF for submit@debbugs.gnu.org; Sat, 06 Aug 2016 16:34:32 -0400 Original-Received: from mail-it0-f53.google.com ([209.85.214.53]:37367) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bW8If-0002yt-8f for 19851@debbugs.gnu.org; Sat, 06 Aug 2016 16:34:30 -0400 Original-Received: by mail-it0-f53.google.com with SMTP id f6so52543551ith.0 for <19851@debbugs.gnu.org>; Sat, 06 Aug 2016 13:34:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=W55GlmZ+QbfH4nEhdv6d3H1+SMYwqi6il1yKOPJZw24=; b=t1GuKK29UGJvdS3YcEykWI68llKgyKUFxuoHm6EorbXNempTVgJa48K9dSixk8KTLx 8WS5PukRkDToFv9jbgZjhaaYPzNUysNw0l1n0JdsB68jwOkAIkIegyzOp3K+0ZxVp6U3 jiKYPcILYwPBeu+Fu/6M3jPwj61fFEcy+sZXbar9ebwsAX82GHSuQd7MFw5Q90TPIs8r MPav7LDvpaJrDj1ki4EoKt7YdbuJR/c7zcAIycxRbe9fdzqtiz0q3A8JH17Fd3/S2Lj4 j5K1qLFBW4wRx2ArfwA0vQYarPQIfJMeAvyOwBPBuIL+VubG+w9S+UlBjIamDhbDNUJ9 XLbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=W55GlmZ+QbfH4nEhdv6d3H1+SMYwqi6il1yKOPJZw24=; b=A3elT8dJIIibDJWsawK+SgZ4AGhcjNqJJQVH6+oybqyHeZYdjsodJP6mAZdN7OAxMT zyNQDXmoIJ6VK86i1iOjPS1FLkuE224TDjI94eGnHszzDR1Drqm8JcKGoM00WYCpmXxH gy8ECcp2rgFmQf8kJJmKx3teZeLi+Qbi80eCztkziNyaHhVv26H0AWHfVubVtQzAcGbN dCUe2NC7dZXp+G1VX5wL9SC83rw9kyvzyWvxCnvFBvpUYLptQJ4S4w/Z9jzH+Za+a0jI giz/htGJYYl6By2K1bx+0RIJh+f0W7/DO15vt1gxnctk2oLVk2wTE5rSXROaNkhNihQh MGZw== X-Gm-Message-State: AEkoousuJtW+PGNeo3BigQ6+DbXbHw27KlY5AwAcO0sydSmj0FxxAdq4Kwvo133rnfeH9Q== X-Received: by 10.36.155.213 with SMTP id o204mr10556993itd.96.1470515663732; Sat, 06 Aug 2016 13:34:23 -0700 (PDT) Original-Received: from zony (206-188-64-44.cpe.distributel.net. [206.188.64.44]) by smtp.googlemail.com with ESMTPSA id o15sm8492936ith.2.2016.08.06.13.34.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 Aug 2016 13:34:23 -0700 (PDT) In-Reply-To: <20151223162815.GA5052@holos> (Mark Oteiza's message of "Wed, 23 Dec 2015 11:28:15 -0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:121919 Archived-At: --=-=-= Content-Type: text/plain Mark Oteiza 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: --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=v1-0001-Improve-error-when-installing-non-package-dirs.patch Content-Description: patch >From dabd1cb2ffe3aed39f11d89f5ab1acab5b1d0426 Mon Sep 17 00:00:00 2001 From: Noam Postavsky 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 --=-=-=--