~ chicken-core (chicken-5) 57e99ee3ad64173b8ceb99a0957b1ba8ade17aa9
commit 57e99ee3ad64173b8ceb99a0957b1ba8ade17aa9
Author: felix <felix@call-with-current-continuation.org>
AuthorDate: Thu Aug 12 06:30:51 2010 -0400
Commit: felix <felix@call-with-current-continuation.org>
CommitDate: Thu Aug 12 06:30:51 2010 -0400
added -keep-going option to chicken-install
diff --git a/chicken-install.scm b/chicken-install.scm
index 22f3eecc..dcedaa7c 100644
--- a/chicken-install.scm
+++ b/chicken-install.scm
@@ -96,6 +96,7 @@
(define *host-extension* *cross-chicken*)
(define *target-extension* *cross-chicken*)
(define *debug-setup* #f)
+ (define *keep-going* #f)
(define (get-prefix)
(cond ((and *cross-chicken*
@@ -423,6 +424,20 @@
#\space
(shellpath (make-pathname (cadr e+d+v) (car e+d+v) "setup"))) )
+ (define-syntax keep-going
+ (syntax-rules ()
+ ((_ (name mode) body ...)
+ (let ((tmp (lambda () body ...)))
+ (if *keep-going*
+ (handle-exceptions ex
+ (begin
+ (print mode " extension `" name "' failed:")
+ (print-error-message ex)
+ (print "\nnevertheless trying to continue ...")
+ #f)
+ (tmp))
+ (tmp))))))
+
(define (install eggs)
(retrieve eggs)
(unless *retrieve-only*
@@ -462,18 +477,23 @@
(lambda (dir)
(print "changing current directory to " dir)
(parameterize ((current-directory dir))
- (let ((cmd (make-install-command e+d+v (> i 1))))
+ (let ((cmd (make-install-command e+d+v (> i 1)))
+ (name (car e+d+v)))
(print " " cmd)
- ($system cmd))
- (when (and *run-tests*
- (not isdep)
- (file-exists? "tests")
- (directory? "tests")
- (file-exists? "tests/run.scm") )
- (set! *running-test* #t)
- (current-directory "tests")
- (command "~a -s run.scm ~a ~a" *csi* (car e+d+v) (caddr e+d+v))
- (set! *running-test* #f))))))
+ (keep-going
+ (name "installing")
+ ($system cmd))
+ (when (and *run-tests*
+ (not isdep)
+ (file-exists? "tests")
+ (directory? "tests")
+ (file-exists? "tests/run.scm") )
+ (set! *running-test* #t)
+ (current-directory "tests")
+ (keep-going
+ (name "testing")
+ (command "~a -s run.scm ~a ~a" *csi* name (caddr e+d+v)))
+ (set! *running-test* #f)))))))
(if (and *target-extension* *host-extension*)
(fluid-let ((*deploy* #f)
(*prefix* #f))
@@ -586,6 +606,7 @@ usage: chicken-install [OPTION | EXTENSION[:VERSION]] ...
-trunk build trunk instead of tagged version (only local)
-D -feature FEATURE features to pass to sub-invocations of `csc'
-debug enable full display of error message information
+ -keep-going continue installation even if dependency fails
EOF
);|
(exit code))
@@ -722,6 +743,9 @@ EOF
((string=? "-trunk" arg)
(set! *trunk* #t)
(loop (cdr args) eggs))
+ ((string=? "-keep-going" arg)
+ (set! *keep-going* #t)
+ (loop (cdr args) eggs))
((string=? "-password" arg)
(unless (pair? (cdr args)) (usage 1))
(set! *password* (cadr args))
diff --git a/manual/Extensions b/manual/Extensions
index d93b684f..83f45cee 100644
--- a/manual/Extensions
+++ b/manual/Extensions
@@ -600,8 +600,9 @@ Available options:
; {{-u -update-db}} : update export database
; {{-repository}} : print path to extension repository
; {{-deploy}} : install extension in the application directory for a deployed application (see [[Deployment]] for more information)
-: {{-D -feature FEATURE}} : pass this on to subinvocations of {{csi}} and {{csc}} (when done via {{compile}} or {{(run (csc ...))}})
-: {{-debug}} : print full call-trace when encountering errors in the setup script
+; {{-D -feature FEATURE}} : pass this on to subinvocations of {{csi}} and {{csc}} (when done via {{compile}} or {{(run (csc ...))}})
+; {{-debug}} : print full call-trace when encountering errors in the setup script
+; {{-keep-going}} : continue installation, even if a dependency fails
{{chicken-install}} recognizes the {{http_proxy}} environment variable, if set.
Trap