When downloading a .gz file, if we actually write-file to that filename
the compressed data would be compressed a second time thanks to
auto-compress-mode. Instead, write to .part file first and then rename
to the destination, as it was before
92a39c84fe.
- If the file was changed on the HTTP server before you restarted emacs,
the checksum wouldn't be recomputed because it would be taken from the
cache.
- The cached value was wrongly including the HTTP headers in the
computation. Added a test for this.
- Computing a SHA1 is not so expensive that it needs the complication of
caching.
* methods/el-get-http.el
(el-get-http-checksums): remove.
(el-get-http-retrieve-callback): don't compute hash on HTTP headers.
(el-get-http-compute-checksum): always compute a fresh hash.
* test/el-get-issue-1752.el: new test.
It knows argument to eval-after-load is code, and that #' implies
existence of a function.
Some of the package.el functions have changed, but that will be dealt
with separately.
Since emacswiki recipes might not have an explicit :url in their recipe,
the :compute-checksum method should fallback to the base url, like the
:install and :guess-website methods.
This includes teaching methods that they now work with a symbolp PACKAGE,
some more cleaning up, and some load-path adjustments now that a part of the
code is in a subdirectory (methods).
Also include some of the tests used to convince oneself that the refactoring
didn't break any and all use cases for el-get, with some rough documentation
about how to use them.