~ chicken-core (chicken-5) 391ead6b2971ab2893c65dd322b10eae6c2e4c22


commit 391ead6b2971ab2893c65dd322b10eae6c2e4c22
Author:     Christian Kellermann <ckeen@pestilenz.org>
AuthorDate: Wed Mar 12 15:42:29 2014 +0100
Commit:     Peter Bex <peter.bex@xs4all.nl>
CommitDate: Sat Mar 15 12:54:42 2014 +0100

    Fix bug #1106 chicken-install -deploy dependencies
    
    This commit will make chicken-install ignore the local egg db while
    traversing the dependency list when in deployment mode. This results
    in all dependencies installed in the deployment directory, instead of
    just the explicitly stated one in the egg's meta file.
    
    I have tested this with a spiffy example and
    
    chicken-install -deploy -p $(pwd)/t spiffy
    
    Which installs all dependencies of spiffy and intarweb.
    
    Signed-off-by: Peter Bex <peter.bex@xs4all.nl>

diff --git a/NEWS b/NEWS
index ac2a528d..e967a15b 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,10 @@
 - Build system
   - The tests can now be run without having to first install CHICKEN.
 
+- Tools
+  - chicken-install: -deploy now correctly installs dependencies of
+    deployed eggs under the deployment directory instead of globally.
+
 4.8.3
 
 - Security fixes
diff --git a/chicken-install.scm b/chicken-install.scm
index 8bfae97a..2df88c8e 100644
--- a/chicken-install.scm
+++ b/chicken-install.scm
@@ -236,8 +236,10 @@
   (define (check-dependency dep)
     (cond ((or (symbol? dep) (string? dep))
 	   (values
-	    (and (not (ext-version dep))
-		 (->string dep))
+	    (if *deploy*
+		(->string dep)
+		(and (not (ext-version dep))
+		     (->string dep)))
 	    #f))
 	  ((and (list? dep) (eq? 'or (car dep)))
 	   (let scan ((ordeps (cdr dep)) (bestm #f) (bestu #f))
@@ -260,7 +262,7 @@
 	  ((and (list? dep) (= 2 (length dep))
 		(or (string? (car dep)) (symbol? (car dep))))
 	   (let ((v (ext-version (car dep))))
-	     (cond ((not v)
+	     (cond ((or *deploy* (not v))
 		    (values
 		     (->string (car dep))
 		     #f))
Trap