GNU bug report logs - #20309
25.0.50; Coding conversion error during clojure-mode package upgrade

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Sun, 12 Apr 2015 13:47:02 UTC

Severity: normal

Found in version 25.0.50

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: steckerhalter <emacs <at> postmomentum.ch>
Subject: bug#21319: closed (Re: bug#20309: 25.0.50; Coding conversion
 error during clojure-mode package upgrade)
Date: Tue, 22 Oct 2019 13:04:06 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#20309: `package-install-file' fails with CRLF (Windows) line endings

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 21319 <at> debbugs.gnu.org.

-- 
20309: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20309
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 20309-done <at> debbugs.gnu.org
Subject: Re: bug#20309: 25.0.50; Coding conversion error during clojure-mode
 package upgrade
Date: Tue, 22 Oct 2019 16:03:12 +0300
On 22.10.2019 3:57, Stefan Kangas wrote:
> I can't reproduce this on current master.  I believe that it has been
> fixed by the following commit (if not before)

Thank you for the reminder.

I haven't seen this lately, so: closing.

[Message part 3 (message/rfc822, inline)]
From: steckerhalter <emacs <at> postmomentum.ch>
To: bug-gnu-emacs <at> gnu.org
Subject: `package-install-file' fails with CRLF (Windows) line endings
Date: Sat, 22 Aug 2015 06:30:30 +0200
package.el contains this code:

(defun package-install-file (file)
  "Install a package from a file.
The file can either be a tar file or an Emacs Lisp file."
  (interactive "fPackage file name: ")
  (with-temp-buffer
    (insert-file-contents-literally file)
    (when (string-match "\\.tar\\'" file) (tar-mode))
    (package-install-from-buffer)))

Since `insert-file-contents-literally' does not do any conversion
`package-buffer-info' fails to parse the info if the file is .el and
contains CRLF line endings. It then errors out with:

Debugger entered--Lisp error: (error "Package lacks a \"Version\" or
\"Package-Version\" header")
  signal(error ("Package lacks a \"Version\" or \"Package-Version\" header"))
  error("Package lacks a \"Version\" or \"Package-Version\" header")
  package-buffer-info()

This affects all recent Emacs versions (including trunk).

What we did now is to replace `insert-file-contents-literally' with
`insert-file-contents' dynamically for non-tar files and that seems to
work, although I'm not sure if that's a good solution since I don't
know if there might be side-effects somewhere that can cause other
problems.

The other solution I can think of might be to adapt the regexp in
`package-buffer-info` so that in can deal with CRLF.

cheers,
steckerhalter



This bug report was last modified 5 years and 291 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.