unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "E. Choroba" <choroba@matfyz.cz>
Cc: 34909@debbugs.gnu.org
Subject: bug#34909: 26.1; Error refreshing packages under language environment
Date: Tue, 19 Mar 2019 13:23:27 +0200	[thread overview]
Message-ID: <83zhprt8eo.fsf@gnu.org> (raw)
In-Reply-To: <alpine.LSU.2.20.1903182231470.3369@fgvyy.zf.zss.phav.pm> (choroba@matfyz.cz)

> Date: Mon, 18 Mar 2019 22:32:58 +0100 (CET)
> From: "E. Choroba" <choroba@matfyz.cz>
> 
> 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 <elpasign@elpa.gnu.org>
> 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 <elpasign@elpa.gnu.org>" [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	other threads:[~2019-03-19 11:23 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-18 21:32 bug#34909: 26.1; Error refreshing packages under language environment E. Choroba
2019-03-19 11:23 ` Eli Zaretskii [this message]
2019-03-19 11:57   ` E. Choroba
2019-03-19 12:29     ` Eli Zaretskii
2019-03-19 13:06       ` E. Choroba
2019-03-19 14:32         ` Eli Zaretskii
2019-03-19 14:43           ` Eli Zaretskii
2019-03-19 15:49             ` E. Choroba
2019-03-19 18:34               ` Eli Zaretskii
2019-03-20  7:00                 ` Eli Zaretskii
2022-04-12 16:40                   ` Lars Ingebrigtsen
2022-04-12 22:52                     ` E. Choroba
2022-04-12 23:27                       ` Lars Ingebrigtsen
2019-03-20 12:45               ` Noam Postavsky
2019-03-20 13:09                 ` Eli Zaretskii
2019-03-19 16:27   ` Stefan Monnier
2019-03-19 18:44     ` Eli Zaretskii
2019-03-19 19:41       ` Stefan Monnier
2019-03-19 20:00         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83zhprt8eo.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=34909@debbugs.gnu.org \
    --cc=choroba@matfyz.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).