~ chicken-core (chicken-5) f0f3ea5b19904aba6ab45cc2cef65a1561e118b9


commit f0f3ea5b19904aba6ab45cc2cef65a1561e118b9
Author:     unknown <felix@.(none)>
AuthorDate: Thu Oct 22 09:40:10 2009 +0200
Commit:     unknown <felix@.(none)>
CommitDate: Mon Nov 2 10:27:49 2009 +0100

    upgrade message in setup-api shows version (thanks to ckeen)

diff --git a/setup-api.scm b/setup-api.scm
index 15dd945d..6562dfb2 100644
--- a/setup-api.scm
+++ b/setup-api.scm
@@ -655,11 +655,11 @@
   (when (version>=? v (chicken-version) ) 
     (error (sprintf "CHICKEN version ~a or higher is required" v)) ) )
 
-(define (upgrade-message ext msg)
+(define (upgrade-message ext msg #!optional version)
   (error
    (sprintf
-    "the required extension `~s' ~a - please run~%~%  chicken-install ~a~%~%and repeat the current installation operation."
-    ext msg ext) ) )
+    "the required extension `~s' ~a - please run~%~%  chicken-install ~a~a~%~%and repeat the current installation operation."
+    ext msg ext (if version (string-append ":" version) "")) ) )
 
 (define (required-extension-version . args)
   (let loop ((args args))
@@ -676,7 +676,8 @@
 			  (upgrade-message 
 			   ext
 			   (sprintf "is older than ~a, which is what this extension requires"
-				    version) ) )
+				    version) 
+                           version) )
 			 (else (loop more)) ) ) 
 		 (upgrade-message ext "is not installed") ) ) )
 	  (else 
Trap