Subject: bug#48137: 27.2; `package-install-file' fails when loading a package file with DOS line endings

From: Ioannis Kappas <[email-masked]>
Date: Wed, 5 May 2021 08:03:17 +0100

On Tue, May 4, 2021 at 5:52 PM Eli Zaretskii <[email-masked]> wrote:
>
> > From: Stefan Monnier <[email-masked]>
> > Cc: [email-masked],  [email-masked]
> > Date: Tue, 04 May 2021 12:27:37 -0400
> >
> > >> I agree that in principle it would be better to copy the file by copying
> > >> its bytes than by `insert-file-contents + write-region`.
> > > Why only "in principle"? what prevents us from actually doing that?
> >
> > Someone willing to take the time and rework the code accordingly?
>
> I thought that's Ioannis?

I can have a look.

Currently, `package-install-file' reads the package contents into a
buffer and calls `package-install-from-buffer' to parse the headers,
download & install its dependencies, and finally install the package
itself from the buffer.

Just to confirm, what we are discussing as a solution (at a high
level) is to parse the package headers from a decoded buffer, download
& install its dependencies, and copy/extract the package file to the
elpa user dir?

Thanks