summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2015-05-07 16:11:50 +0100
committerArtur Malabarba <bruce.connor.am@gmail.com>2015-05-07 16:13:45 +0100
commit14bb519f1034ddb38ce375cbad7095d9b07f8b26 (patch)
treeacf9714a9fd6e6f4c09e95ef72c62de6020eb2b2 /lisp/emacs-lisp
parentad39858fae45452d39c7f37c3eaf0037fa5620b8 (diff)
downloademacs-14bb519f1034ddb38ce375cbad7095d9b07f8b26.tar.gz
emacs-14bb519f1034ddb38ce375cbad7095d9b07f8b26.tar.bz2
emacs-14bb519f1034ddb38ce375cbad7095d9b07f8b26.zip
* lisp/emacs-lisp/package.el: New "external" package status
An external package is any installed package that's not built-in and not from `package-user-dir', which usually means it's from an entry in `package-directory-list'. They are treated much like built-in packages, in that they cannot be through the Package Menu deleted and are not considered for upgrades. (package-desc-status): Identify if a package is installed outside `package-user-dir'. (package-menu--print-info-simple) (package-menu--status-predicate): Add support for it. * etc/NEWS: Document it.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/package.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 7968ecde127..615631383e7 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -2457,7 +2457,9 @@ of these dependencies, similar to the list returned by
(t "disabled"))))
(dir ;One of the installed packages.
(cond
- ((not (file-exists-p (package-desc-dir pkg-desc))) "deleted")
+ ((not (file-exists-p dir)) "deleted")
+ ;; Not inside `package-user-dir'.
+ ((not (file-in-directory-p dir package-user-dir)) "external")
((eq pkg-desc (cadr (assq name package-alist)))
(if (not signed) "unsigned"
(if (package--user-selected-p name)
@@ -2662,6 +2664,7 @@ Return (PKG-DESC [NAME VERSION STATUS DOC])."
(let* ((status (package-desc-status pkg))
(face (pcase status
(`"built-in" 'font-lock-builtin-face)
+ (`"external" 'font-lock-builtin-face)
(`"available" 'default)
(`"avail-obso" 'font-lock-comment-face)
(`"new" 'bold)
@@ -2977,6 +2980,8 @@ Optional argument NOQUERY non-nil means do not ask the user to confirm."
((string= sB "unsigned") nil)
((string= sA "held") t)
((string= sB "held") nil)
+ ((string= sA "external") t)
+ ((string= sB "external") nil)
((string= sA "built-in") t)
((string= sB "built-in") nil)
((string= sA "obsolete") t)