diff options
Diffstat (limited to 'lisp/emacs-lisp/package.el')
-rw-r--r-- | lisp/emacs-lisp/package.el | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 7ca62464bd0..c2aaabdd6a6 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -836,6 +836,8 @@ GnuPG keyring is located under \"gnupg\" in `package-user-dir'." sig)) (epg-context-result-for context 'verify))))) (if (null good-signatures) + ;; FIXME: Only signal an error if the signature is invalid, not if we + ;; simply lack the key needed to check the sig! (error "Failed to verify signature %s: %S" sig-file (mapcar #'epg-signature-to-string @@ -1664,6 +1666,9 @@ package PKG-DESC, add one. The alist is keyed with PKG-DESC." (defvar package-list-unversioned nil "If non-nil include packages that don't have a version in `list-package'.") +(defvar package-list-unsigned nil + "If non-nil, mention in the list which packages were installed w/o signature.") + (defun package-desc-status (pkg-desc) (let* ((name (package-desc-name pkg-desc)) (dir (package-desc-dir pkg-desc)) @@ -1684,9 +1689,8 @@ package PKG-DESC, add one. The alist is keyed with PKG-DESC." (dir ;One of the installed packages. (cond ((not (file-exists-p (package-desc-dir pkg-desc))) "deleted") - ((eq pkg-desc (cadr (assq name package-alist))) (if signed - "installed" - "unsigned")) + ((eq pkg-desc (cadr (assq name package-alist))) + (if (or (not package-list-unsigned) signed) "installed" "unsigned")) (t "obsolete"))) (t (let* ((ins (cadr (assq name package-alist))) @@ -1696,9 +1700,9 @@ package PKG-DESC, add one. The alist is keyed with PKG-DESC." (if (memq name package-menu--new-package-list) "new" "available")) ((version-list-< version ins-v) "obsolete") - ((version-list-= version ins-v) (if signed - "installed" - "unsigned")))))))) + ((version-list-= version ins-v) + (if (or (not package-list-unsigned) signed) + "installed" "unsigned")))))))) (defun package-menu--refresh (&optional packages keywords) "Re-populate the `tabulated-list-entries'. |