Seemless integration of ffi-curl based packages install.
authorSteve Youngs <steve@sxemacs.org>
Sat, 28 May 2016 23:50:59 +0000 (09:50 +1000)
committerSteve Youngs <steve@sxemacs.org>
Sat, 28 May 2016 23:50:59 +0000 (09:50 +1000)
commit751bdf6e4f2b0ddf965dd8108f3838f8e470c4e8
treeaa45384d8d7c1fc3e89ede0546967f0d0e748f78
parente1da7033943ef78c20db65b8c50487692c16e109
Seemless integration of ffi-curl based packages install.

With this changeset, PUI uses the same code for retrieving remote package
files for both EFS backed PUI and ffi-curl backed PUI.  As a bonus
to this, the following forms are now available for use when ffi-curl is
loaded...

  (file-exists-p "http://example.com/filename")
  (file-readable-p "http://example.com/filename")
  (insert-file-contents-literally "http://example.com/filename")
  (copy-file "http://example.com/filename" "/local/file")
  (expand-file-name "http://example.com/filename")
  (file-name-directory "http://example.com/filename")
  (file-name-nondirectory "http://example.com/filename")

* lisp/package-get.el (package-get-update-base): Set the
MUST-MATCH arg in the call to #'read-file-name to nil when dealing
with URI style package sites so it more or less does a
#'read-string in those cases.
Maybe save index from URI style package sites as well.
(package-get): Remove the #'curl:download retrieval.  Package
downloading is now seemless regardless of the transport used.
(package-get-remote-filename): Immediately return FILENAME when
that is a URI style path as well.

* lisp/ffi/ffi-curl.el (curl:file-exists-p): New
(curl:file-readable-p): New
(curl:insert-file-contents-literally): New
(curl:copy-file): New
(curl:expand-file-name): New
(curl:file-name-directory): New
(curl:file-name-nondirectory): New
(curl:file-handler-regexp): New
(curl:file-handler): New

Signed-off-by: Steve Youngs <steve@sxemacs.org>
lisp/ffi/ffi-curl.el
lisp/package-get.el