Commit 0a27804c authored by Stefan Monnier's avatar Stefan Monnier

* lisp/emacs-lisp/package.el (package-list-unsigned): New var.

(package-desc-status): Obey it.

Fixes: debbugs:17625
parent a5128e3d
2014-06-25 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/package.el (package-list-unsigned): New var (bug#17625).
(package-desc-status): Obey it.
2014-06-25 Stephen Berman <stephen.berman@gmx.net>
* calendar/todo-mode.el: Fix two bugs.
......
......@@ -823,6 +823,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
......@@ -1651,6 +1653,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))
......@@ -1671,9 +1676,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)))
......@@ -1683,9 +1687,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'.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment