diff options
| author | Dmitry Gutov | 2014-03-25 00:38:06 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2014-03-25 00:38:06 +0200 |
| commit | 3e2377ce2f4eeb141ffbd000723c55813f78b08f (patch) | |
| tree | 7922b10c1ce1e548527041e35e0508f70639f9f7 | |
| parent | 544ab460f5a473854be948847364125357928774 (diff) | |
| download | emacs-3e2377ce2f4eeb141ffbd000723c55813f78b08f.tar.gz emacs-3e2377ce2f4eeb141ffbd000723c55813f78b08f.zip | |
Fix bug#16762
* lisp/emacs-lisp/package.el (package--add-to-archive-contents):
Include already installed and built-in packages in
`package-archive-contents'.
(package-install): Don't include already installed packages in the
options on interactive invocation.
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/emacs-lisp/package.el | 18 |
2 files changed, 16 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 20b0a98f8d7..667b85729d7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2014-03-24 Dmitry Gutov <dgutov@yandex.ru> | ||
| 2 | |||
| 3 | * emacs-lisp/package.el (package--add-to-archive-contents): | ||
| 4 | Include already installed and built-in packages in | ||
| 5 | `package-archive-contents'. | ||
| 6 | (package-install): Don't include already installed packages in the | ||
| 7 | options during interactive invocation. (Bug#16762) | ||
| 8 | |||
| 1 | 2014-03-24 Daniel Colascione <dancol@dancol.org> | 9 | 2014-03-24 Daniel Colascione <dancol@dancol.org> |
| 2 | 10 | ||
| 3 | * emacs-lisp/cl-macs.el (cl--do-arglist): Use `plist-member' | 11 | * emacs-lisp/cl-macs.el (cl--do-arglist): Use `plist-member' |
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 39cfd8e46ec..49366cffc22 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el | |||
| @@ -1047,14 +1047,9 @@ Also, add the originating archive to the `package-desc' structure." | |||
| 1047 | (existing-packages (assq name package-archive-contents)) | 1047 | (existing-packages (assq name package-archive-contents)) |
| 1048 | (pinned-to-archive (assoc name package-pinned-packages))) | 1048 | (pinned-to-archive (assoc name package-pinned-packages))) |
| 1049 | (cond | 1049 | (cond |
| 1050 | ;; Skip entirely if pinned to another archive or already installed. | 1050 | ;; Skip entirely if pinned to another archive. |
| 1051 | ((or (and pinned-to-archive | 1051 | ((and pinned-to-archive |
| 1052 | (not (equal (cdr pinned-to-archive) archive))) | 1052 | (not (equal (cdr pinned-to-archive) archive))) |
| 1053 | (let ((bi (assq name package--builtin-versions))) | ||
| 1054 | (and bi (version-list-= version (cdr bi)))) | ||
| 1055 | (let ((ins (cdr (assq name package-alist)))) | ||
| 1056 | (and ins (version-list-= version | ||
| 1057 | (package-desc-version (car ins)))))) | ||
| 1058 | nil) | 1053 | nil) |
| 1059 | ((not existing-packages) | 1054 | ((not existing-packages) |
| 1060 | (push (list name pkg-desc) package-archive-contents)) | 1055 | (push (list name pkg-desc) package-archive-contents)) |
| @@ -1090,8 +1085,11 @@ in an archive in `package-archives'. Interactively, prompt for its name." | |||
| 1090 | (package-refresh-contents)) | 1085 | (package-refresh-contents)) |
| 1091 | (list (intern (completing-read | 1086 | (list (intern (completing-read |
| 1092 | "Install package: " | 1087 | "Install package: " |
| 1093 | (mapcar (lambda (elt) (symbol-name (car elt))) | 1088 | (delq nil |
| 1094 | package-archive-contents) | 1089 | (mapcar (lambda (elt) |
| 1090 | (unless (package-installed-p (car elt)) | ||
| 1091 | (symbol-name (car elt)))) | ||
| 1092 | package-archive-contents)) | ||
| 1095 | nil t))))) | 1093 | nil t))))) |
| 1096 | (package-download-transaction | 1094 | (package-download-transaction |
| 1097 | (if (package-desc-p pkg) | 1095 | (if (package-desc-p pkg) |