summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/package.el
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2015-01-14 12:57:32 -0200
committerArtur Malabarba <bruce.connor.am@gmail.com>2015-01-16 22:21:12 -0200
commita2cd6d90d20408a6265c8615697dbff94df3f098 (patch)
treec01bb226604e86dc38e7320334d3f031ee225468 /lisp/emacs-lisp/package.el
parent40d963ff660eb256652cdca98094bfbda23daa9a (diff)
downloademacs-a2cd6d90d20408a6265c8615697dbff94df3f098.tar.gz
emacs-a2cd6d90d20408a6265c8615697dbff94df3f098.tar.bz2
emacs-a2cd6d90d20408a6265c8615697dbff94df3f098.zip
emacs-lisp/package.el and package-x.el: References to package-desc-kind
Diffstat (limited to 'lisp/emacs-lisp/package.el')
-rw-r--r--lisp/emacs-lisp/package.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index f585c0be47a..08031c846cf 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -413,6 +413,7 @@ Slots:
(pcase (package-desc-kind pkg-desc)
(`single ".el")
(`tar ".tar")
+ (`dir "")
(kind (error "Unknown package kind: %s" kind))))
(defun package-desc--keywords (pkg-desc)
@@ -939,6 +940,9 @@ GnuPG keyring is located under \"gnupg\" in `package-user-dir'."
(defun package-install-from-archive (pkg-desc)
"Download and install a tar package."
+ ;; This won't happen, unless the archive is doing something wrong.
+ (when (eq (package-desc-kind pkg-desc) 'dir)
+ (error "Can't install directory package from archive"))
(let* ((location (package-archive-base pkg-desc))
(file (concat (package-desc-full-name pkg-desc)
(package-desc-suffix pkg-desc)))