Hi!

We discussed ticket #1298 ( https://bugs.call-cc.org/ticket/1298 ) on
IRC a while ago, and one possible workaround was to add a way to
disable installation of the requested egg’s dependencies.

Here is a patch that does just that, this only makes sense for
CHICKEN 4 of course (based on Mario’s proposition).
>From bbf68c7b4a3b6492923e01aa311a14c1e319de5d Mon Sep 17 00:00:00 2001
From: Kooda <ko...@upyum.com>
Date: Wed, 18 Jan 2017 02:21:11 +0100
Subject: [PATCH] Add the -no-deps-install option to chicken-install.

---
 chicken-install.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/chicken-install.scm b/chicken-install.scm
index c8d69984..a361c7c0 100644
--- a/chicken-install.scm
+++ b/chicken-install.scm
@@ -97,6 +97,7 @@
   (define *csc-features* '())
   (define *csc-nonfeatures* '())
   (define *prefix* #f)
+  (define *no-install-deps* #f)
   (define *aliases* '())
   (define *cross-chicken* (feature? #:cross-chicken))
   (define *host-extension* *cross-chicken*)
@@ -467,7 +468,9 @@
 		      (check-platform (car e+d+v) meta)
                       (print "checking dependencies for `" (car e+d+v) "' ...")
                       (let-values (((missing upgrade) 
-				    (outdated-dependencies (car e+d+v) meta)))
+				    (if *no-install-deps*
+				      (values '() '())
+				      (outdated-dependencies (car e+d+v) meta))))
 			(set! missing (apply-mappings missing)) ;XXX only missing - wrong?
 			(set! *dependencies*
 			  (cons
@@ -814,6 +817,7 @@ usage: chicken-install [OPTION | EXTENSION[:VERSION]] ...
   -r   -retrieve                only retrieve egg into current directory, don't install
   -n   -no-install              do not install, just build (implies `-keep')
   -p   -prefix PREFIX           change installation prefix to PREFIX
+       -no-install-deps         do not install dependencies
        -list                    list extensions available over selected transport and location
        -host                    when cross-compiling, compile extension only for host
        -target                  when cross-compiling, compile extension only for target
@@ -953,6 +957,9 @@ EOF
 				(normalize-pathname 
 				 (make-pathname (current-directory) p) ) ) ) )
                         (loop (cddr args) eggs))
+		       ((string=? arg "-no-install-deps")
+			(set! *no-install-deps* #t)
+			(loop (cdr args) eggs))
                        ((or (string=? arg "-n") (string=? arg "-no-install"))
                         (set! *keep* #t)
                         (set! *no-install* #t)
-- 
2.11.0

_______________________________________________
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to