diff options
| author | Artur Malabarba | 2015-01-14 12:57:32 -0200 |
|---|---|---|
| committer | Artur Malabarba | 2015-01-16 22:21:12 -0200 |
| commit | a2cd6d90d20408a6265c8615697dbff94df3f098 (patch) | |
| tree | c01bb226604e86dc38e7320334d3f031ee225468 | |
| parent | 40d963ff660eb256652cdca98094bfbda23daa9a (diff) | |
| download | emacs-a2cd6d90d20408a6265c8615697dbff94df3f098.tar.gz emacs-a2cd6d90d20408a6265c8615697dbff94df3f098.zip | |
emacs-lisp/package.el and package-x.el: References to package-desc-kind
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/emacs-lisp/package-x.el | 4 | ||||
| -rw-r--r-- | lisp/emacs-lisp/package.el | 4 |
3 files changed, 13 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b69df34e673..f78714b3217 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -7,6 +7,11 @@ | |||
| 7 | directory. The return result is a `package-desc'. | 7 | directory. The return result is a `package-desc'. |
| 8 | (package-install-from-buffer): Install packages from dired buffer. | 8 | (package-install-from-buffer): Install packages from dired buffer. |
| 9 | (package-install-file): Install packages from directory. | 9 | (package-install-file): Install packages from directory. |
| 10 | (package-desc-suffix) | ||
| 11 | (package-install-from-archive) | ||
| 12 | * emacs-lisp/package-x.el (package-upload-buffer-internal): Ensure | ||
| 13 | all remaining instances of `package-desc-kind' handle the 'dir | ||
| 14 | value. | ||
| 10 | 15 | ||
| 11 | 2015-01-16 Jorgen Schaefer <contact@jorgenschaefer.de> | 16 | 2015-01-16 Jorgen Schaefer <contact@jorgenschaefer.de> |
| 12 | 17 | ||
diff --git a/lisp/emacs-lisp/package-x.el b/lisp/emacs-lisp/package-x.el index f2bcdad1720..e0945d47a45 100644 --- a/lisp/emacs-lisp/package-x.el +++ b/lisp/emacs-lisp/package-x.el | |||
| @@ -207,6 +207,10 @@ if it exists." | |||
| 207 | (pkg-version (package-version-join split-version)) | 207 | (pkg-version (package-version-join split-version)) |
| 208 | (pkg-buffer (current-buffer))) | 208 | (pkg-buffer (current-buffer))) |
| 209 | 209 | ||
| 210 | ;; `package-upload-file' will error if given a directory, | ||
| 211 | ;; but we check it here as well just in case. | ||
| 212 | (when (eq 'dir file-type) | ||
| 213 | (user-error "Can't upload directory, tar it instead")) | ||
| 210 | ;; Get archive-contents from ARCHIVE-URL if it's non-nil, or | 214 | ;; Get archive-contents from ARCHIVE-URL if it's non-nil, or |
| 211 | ;; from `package-archive-upload-base' otherwise. | 215 | ;; from `package-archive-upload-base' otherwise. |
| 212 | (let ((contents (or (package--archive-contents-from-url archive-url) | 216 | (let ((contents (or (package--archive-contents-from-url archive-url) |
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: | |||
| 413 | (pcase (package-desc-kind pkg-desc) | 413 | (pcase (package-desc-kind pkg-desc) |
| 414 | (`single ".el") | 414 | (`single ".el") |
| 415 | (`tar ".tar") | 415 | (`tar ".tar") |
| 416 | (`dir "") | ||
| 416 | (kind (error "Unknown package kind: %s" kind)))) | 417 | (kind (error "Unknown package kind: %s" kind)))) |
| 417 | 418 | ||
| 418 | (defun package-desc--keywords (pkg-desc) | 419 | (defun package-desc--keywords (pkg-desc) |
| @@ -939,6 +940,9 @@ GnuPG keyring is located under \"gnupg\" in `package-user-dir'." | |||
| 939 | 940 | ||
| 940 | (defun package-install-from-archive (pkg-desc) | 941 | (defun package-install-from-archive (pkg-desc) |
| 941 | "Download and install a tar package." | 942 | "Download and install a tar package." |
| 943 | ;; This won't happen, unless the archive is doing something wrong. | ||
| 944 | (when (eq (package-desc-kind pkg-desc) 'dir) | ||
| 945 | (error "Can't install directory package from archive")) | ||
| 942 | (let* ((location (package-archive-base pkg-desc)) | 946 | (let* ((location (package-archive-base pkg-desc)) |
| 943 | (file (concat (package-desc-full-name pkg-desc) | 947 | (file (concat (package-desc-full-name pkg-desc) |
| 944 | (package-desc-suffix pkg-desc))) | 948 | (package-desc-suffix pkg-desc))) |