[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 14bb519: * lisp/emacs-lisp/package.el: New "externa
From: |
Artur Malabarba |
Subject: |
[Emacs-diffs] master 14bb519: * lisp/emacs-lisp/package.el: New "external" package status |
Date: |
Thu, 07 May 2015 15:13:58 +0000 |
branch: master
commit 14bb519f1034ddb38ce375cbad7095d9b07f8b26
Author: Artur Malabarba <address@hidden>
Commit: Artur Malabarba <address@hidden>
* 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.
---
etc/NEWS | 11 +++++++++++
lisp/emacs-lisp/package.el | 7 ++++++-
2 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index 3ab1f4b..48c3a2a5 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -255,6 +255,17 @@ by default at least in Debian, for security reasons).
** 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.
+
+The effect, is that a user can manually place a specific version of a
+package inside `package-directory-list' and the Package Menu will
+always respect that.
+
*** If a package is available on multiple archives and one has higher
priority (as per `package-archive-priorities') only that one is
listed. This can be configured with `package-menu-hide-low-priority'.
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 7968ecd..6156313 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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 14bb519: * lisp/emacs-lisp/package.el: New "external" package status,
Artur Malabarba <=