bug#81508: 31.0.50; package.el archive contents download robustness issues
Sean Whitton <[email protected]>
| Newsgroups | gmane.emacs.bugs |
|---|---|
| Message-ID | <[email protected]> |
Philip Kaludercic [28/Jul 3:22pm GMT] wrote: > Sean Whitton <[email protected]> writes: > >> If there is an ENOSPC in the middle of writing the archive-contents >> file, the truncated file is left behind. This is because >> package--download-one-archive uses plain write-region instead of writing >> into a temporary file and then atomically renaming it into place. > > I feel like this is not the only place where something like this could > go wrong, so it would be useful to perhaps have some functionality > directly in url.el to download a file and rename it atomically, since > IIRC there are a number of edge-cases to consider here. Makes sense. >> Worse, if a truncated file has been left behind, >> package--read-archive-file errors instead of trying to delete and >> re-download the file. > > Assuming we fix the above, should we also make this function more robust > by e.g. trying to re-download the archive if it is malformed? I'm not sure myself, I don't use package.el. In this bug, I'm more concerned about errors being signaled during Emacs startup. -- Sean Whitton