bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#34909: 26.1; Error refreshing packages under language environment


From: Eli Zaretskii
Subject: bug#34909: 26.1; Error refreshing packages under language environment
Date: Tue, 19 Mar 2019 13:23:27 +0200

> Date: Mon, 18 Mar 2019 22:32:58 +0100 (CET)
> From: "E. Choroba" <address@hidden>
> 
> When melpa is included in the package archives and the package list is
> being updated, the result depends on the language environment. Under
> "English", everything works OK:
> 
> emacs -Q --eval '(progn (set-language-environment "English")(require (quote 
> package))(add-to-list (quote package-archives) (quote ("melpa" . 
> "http://melpa.org/packages/";)))(package-list-packages))'
> 
> When the environment is set to "French" or "Czech", though, it fails with
> 
> Failed to verify signature archive-contents.sig:
> Bad signature from 474F05837FBDEF9B GNU ELPA Signing Agent <address@hidden>
> Command output:
> gpg: Signature made Mon 18 Mar 2019 10:10:04 PM CET using DSA key ID 7FBDEF9B
> gpg: BAD signature from "GNU ELPA Signing Agent <address@hidden>" [unknown]
> 
> At the same time, it asks for encoding:

Thanks, this should be fixed now on the release branch.

The patch is below, should you want to install it locally.

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 3118e38..1a185de 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1538,14 +1538,16 @@ package--download-one-archive
                 (member name package-unsigned-archives))
             ;; If we don't care about the signature, save the file and
             ;; we're done.
-            (progn (write-region content nil local-file nil 'silent)
+            (progn (let ((coding-system-for-write 'utf-8))
+                     (write-region content nil local-file nil 'silent))
                    (package--update-downloads-in-progress archive))
           ;; If we care, check it (perhaps async) and *then* write the file.
           (package--check-signature
            location file content async
            ;; This function will be called after signature checking.
            (lambda (&optional good-sigs)
-             (write-region content nil local-file nil 'silent)
+             (let ((coding-system-for-write 'utf-8))
+               (write-region content nil local-file nil 'silent))
              ;; Write out good signatures into archive-contents.signed file.
              (when good-sigs
                (write-region (mapconcat #'epg-signature-to-string good-sigs 
"\n")
@@ -3425,6 +3427,9 @@ list-packages
   ;; Generate the Package Menu.
   (let ((buf (get-buffer-create "*Packages*")))
     (with-current-buffer buf
+      ;; Since some packages have their descriptions include non-ASCII
+      ;; characters...
+      (setq buffer-file-coding-system 'utf-8)
       (package-menu-mode)
 
       ;; Fetch the remote list of packages.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]