diff options
| author | Stefan Monnier | 2014-09-27 12:25:53 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2014-09-27 12:25:53 -0400 |
| commit | a5426ef3c2c1479cc045e271cbd60a73de548ace (patch) | |
| tree | 69468d02b4b437f105e8646638f077813c88289f | |
| parent | af71540b126e2449d365b0d2c88f4026f4b6b3f6 (diff) | |
| download | emacs-a5426ef3c2c1479cc045e271cbd60a73de548ace.tar.gz emacs-a5426ef3c2c1479cc045e271cbd60a73de548ace.zip | |
* lisp/emacs-lisp/package.el (package-check-signature): Default to nil if
GPG is not available.
(package-refresh-contents): Don't mess with the keyring if we won't
check the signatures anyway.
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/emacs-lisp/package.el | 16 |
2 files changed, 16 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0a72fa4aa2b..62d3ba4445c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2014-09-27 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * emacs-lisp/package.el (package-check-signature): Default to nil if | ||
| 4 | GPG is not available. | ||
| 5 | (package-refresh-contents): Don't mess with the keyring if we won't | ||
| 6 | check the signatures anyway. | ||
| 7 | |||
| 1 | 2014-09-18 Kan-Ru Chen <kanru@kanru.info> | 8 | 2014-09-18 Kan-Ru Chen <kanru@kanru.info> |
| 2 | 9 | ||
| 3 | * window.el (fit-window-to-buffer): When counting buffer width, | 10 | * window.el (fit-window-to-buffer): When counting buffer width, |
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 329ab8e6de7..958e9d29ebd 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el | |||
| @@ -289,7 +289,9 @@ contrast, `package-user-dir' contains packages for personal use." | |||
| 289 | :group 'package | 289 | :group 'package |
| 290 | :version "24.1") | 290 | :version "24.1") |
| 291 | 291 | ||
| 292 | (defcustom package-check-signature 'allow-unsigned | 292 | (defcustom package-check-signature |
| 293 | (if (progn (require 'epg-config) (executable-find epg-gpg-program)) | ||
| 294 | 'allow-unsigned) | ||
| 293 | "Non-nil means to check package signatures when installing. | 295 | "Non-nil means to check package signatures when installing. |
| 294 | The value `allow-unsigned' means to still install a package even if | 296 | The value `allow-unsigned' means to still install a package even if |
| 295 | it is unsigned. | 297 | it is unsigned. |
| @@ -1313,12 +1315,12 @@ makes them available for download." | |||
| 1313 | (make-directory package-user-dir t)) | 1315 | (make-directory package-user-dir t)) |
| 1314 | (let ((default-keyring (expand-file-name "package-keyring.gpg" | 1316 | (let ((default-keyring (expand-file-name "package-keyring.gpg" |
| 1315 | data-directory))) | 1317 | data-directory))) |
| 1316 | (if (file-exists-p default-keyring) | 1318 | (when (and package-check-signature (file-exists-p default-keyring)) |
| 1317 | (condition-case-unless-debug error | 1319 | (condition-case-unless-debug error |
| 1318 | (progn | 1320 | (progn |
| 1319 | (epg-check-configuration (epg-configuration)) | 1321 | (epg-check-configuration (epg-configuration)) |
| 1320 | (package-import-keyring default-keyring)) | 1322 | (package-import-keyring default-keyring)) |
| 1321 | (error (message "Cannot import default keyring: %S" (cdr error)))))) | 1323 | (error (message "Cannot import default keyring: %S" (cdr error)))))) |
| 1322 | (dolist (archive package-archives) | 1324 | (dolist (archive package-archives) |
| 1323 | (condition-case-unless-debug nil | 1325 | (condition-case-unless-debug nil |
| 1324 | (package--download-one-archive archive "archive-contents") | 1326 | (package--download-one-archive archive "archive-contents") |