From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#34909: 26.1; Error refreshing packages under language environment Date: Tue, 19 Mar 2019 13:23:27 +0200 Message-ID: <83zhprt8eo.fsf@gnu.org> References: Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="144755"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 34909@debbugs.gnu.org To: "E. Choroba" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 19 12:24:22 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h6Cr0-000bX7-6u for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 Mar 2019 12:24:22 +0100 Original-Received: from localhost ([127.0.0.1]:55479 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6Cqz-00067o-2w for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 Mar 2019 07:24:21 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:56218) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6Cqs-00066M-NA for bug-gnu-emacs@gnu.org; Tue, 19 Mar 2019 07:24:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h6Cqk-0002dn-Qp for bug-gnu-emacs@gnu.org; Tue, 19 Mar 2019 07:24:10 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36098) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h6Cqg-0002a5-64 for bug-gnu-emacs@gnu.org; Tue, 19 Mar 2019 07:24:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h6Cqf-00065w-TJ for bug-gnu-emacs@gnu.org; Tue, 19 Mar 2019 07:24:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 19 Mar 2019 11:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34909 X-GNU-PR-Package: emacs Original-Received: via spool by 34909-submit@debbugs.gnu.org id=B34909.155299462423399 (code B ref 34909); Tue, 19 Mar 2019 11:24:01 +0000 Original-Received: (at 34909) by debbugs.gnu.org; 19 Mar 2019 11:23:44 +0000 Original-Received: from localhost ([127.0.0.1]:49642 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h6CqN-00065K-Qc for submit@debbugs.gnu.org; Tue, 19 Mar 2019 07:23:44 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:41719) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h6CqM-000655-3R for 34909@debbugs.gnu.org; Tue, 19 Mar 2019 07:23:42 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57183) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6CqE-0002BC-KF; Tue, 19 Mar 2019 07:23:34 -0400 Original-Received: from [176.228.60.248] (port=1109 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h6CqE-0004Q0-3x; Tue, 19 Mar 2019 07:23:34 -0400 In-reply-to: (choroba@matfyz.cz) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:156491 Archived-At: > Date: Mon, 18 Mar 2019 22:32:58 +0100 (CET) > From: "E. Choroba" > > 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 > 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 " [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.