summaryrefslogtreecommitdiff
path: root/henrietta-cache.scm
diff options
context:
space:
mode:
Diffstat (limited to 'henrietta-cache.scm')
-rw-r--r--henrietta-cache.scm24
1 files changed, 16 insertions, 8 deletions
diff --git a/henrietta-cache.scm b/henrietta-cache.scm
index 832dcc3..fae2499 100644
--- a/henrietta-cache.scm
+++ b/henrietta-cache.scm
@@ -174,19 +174,27 @@ 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 egg-file)
+ ;; CHICKEN 5 egg description format: .egg
+ ((egg-file)
(condition-case
(let* ((meta (car (call-with-input-request uri #f read-file)))
- (files (or (alist-ref 'files meta)
- ;; Egg description files for C5 use
- ;; `distribution-files' to specify files to
- ;; cache.
- (alist-ref 'distribution-files meta))))
+ (files (alist-ref 'distribution-files meta)))
(unless files
- (error "No \"files\" entry found in meta or egg file" uri))
+ (error "No \"distribution-files\" entry found in egg file" uri))
(download-files-from-list (uri-reference uri) files cache-dir))
(e (exn http)
- (error (sprintf "Could not download meta or egg file \"~A\" -- ~A\n"
+ (error (sprintf "Could not download meta file \"~A\" -- ~A\n"
+ uri (get-condition-property e 'exn 'message))))))
+ ;; CHICKEN 4 egg meta information format: .meta
+ ((meta-file)
+ (condition-case
+ (let* ((meta (car (call-with-input-request uri #f read-file)))
+ (files (alist-ref 'files meta)))
+ (unless files
+ (error "No \"files\" entry found in meta 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"
uri (get-condition-property e 'exn 'message))))))
((files-list)
(condition-case