diff options
author | Mario Domenech Goulart <mario@parenteses.org> | 2018-09-05 09:55:59 +0200 |
---|---|---|
committer | Peter Bex <peter@more-magic.net> | 2018-09-05 18:01:52 +0200 |
commit | 7dfa6f85e0a11b51eae55dca5dbe6f7af764f130 (patch) | |
tree | 8043b4e6dfb3718cedb53f6408dbcdcbcffc3333 | |
parent | 612a1644aae737af912d3ad31a0617373408367e (diff) | |
download | henrietta-cache-7dfa6f85e0a11b51eae55dca5dbe6f7af764f130.tar.gz |
Support for CHICKEN 5's egg description files
Support both `meta-file' and `egg-file' as URI types, and both `files'
and `distribution-files' forms in egg description files (.meta for C4
and .egg for C5).
Note that:
* Although `distribution-files' is intended to be used by C5's
chicken-install, it can also be used in the toplevel of .meta files,
as chicken-install for C4 is very permissive. `files', however,
cannot be used in the toplevel of .egg files.
* (uri meta-file ...) can point to a .egg file, and (uri egg-file ...)
can point to a .meta file. `egg-file' is just and alias to
`meta-file' for naming consistency in C5.
* henrietta-cache for C4 can be used to cache eggs for C5 (and
supports `egg-file' and `distribution-files').
Signed-off-by: Peter Bex <peter@more-magic.net>
-rw-r--r-- | henrietta-cache.scm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/henrietta-cache.scm b/henrietta-cache.scm index ba99aa2..832dcc3 100644 --- a/henrietta-cache.scm +++ b/henrietta-cache.scm @@ -174,15 +174,19 @@ EOF ((zip) (sprintf "unzip -d ~A -o -qq ~A" (qs dir) (qs archive))) (else (error (sprintf "Unknown archive type `~S' (shouldn't happen!)" distribution-file-type))))))) - ((meta-file) + ((meta-file egg-file) (condition-case (let* ((meta (car (call-with-input-request uri #f read-file))) - (files (alist-ref 'files meta))) + (files (or (alist-ref 'files meta) + ;; Egg description files for C5 use + ;; `distribution-files' to specify files to + ;; cache. + (alist-ref 'distribution-files meta)))) (unless files - (error "No \"files\" entry found in meta file" uri)) + (error "No \"files\" entry found in meta or egg file" uri)) (download-files-from-list (uri-reference uri) files cache-dir)) (e (exn http) - (error (sprintf "Could not download meta-file \"~A\" -- ~A\n" + (error (sprintf "Could not download meta or egg file \"~A\" -- ~A\n" uri (get-condition-property e 'exn 'message)))))) ((files-list) (condition-case |