From 7dfa6f85e0a11b51eae55dca5dbe6f7af764f130 Mon Sep 17 00:00:00 2001 From: Mario Domenech Goulart Date: Wed, 5 Sep 2018 09:55:59 +0200 Subject: 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 --- henrietta-cache.scm | 12 ++++++++---- 1 file 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 -- cgit v1.2.3