~ chicken-core (chicken-5) 4ae966a014d6c750a6e4d140b3839ace9ff137f5
commit 4ae966a014d6c750a6e4d140b3839ace9ff137f5
Author: felix <felix@call-with-current-continuation.org>
AuthorDate: Mon Sep 20 05:03:13 2010 -0400
Commit: felix <felix@call-with-current-continuation.org>
CommitDate: Mon Sep 20 05:03:13 2010 -0400
fix for egg-mapping code in chicken-install (thanks to Kon Lovett)
diff --git a/chicken-install.scm b/chicken-install.scm
index dcedaa7c..bcd41c9a 100644
--- a/chicken-install.scm
+++ b/chicken-install.scm
@@ -550,8 +550,13 @@
(remove-directory tmpdir))))
(define (apply-mappings eggs)
+ (define (canonical x)
+ (cond ((symbol? x) (cons (symbol->string x) #f))
+ ((string? x) (cons x #f))
+ ((pair? x) x)
+ (else (error "internal error - bad egg spec" x))))
(define (same? e1 e2)
- (string=? (->string e1) (->string e2)))
+ (equal? (car (canonical e1)) (car (canonical e2))))
(let ((eggs2
(delete-duplicates
(append-map
@@ -561,7 +566,7 @@
(lambda (m) (map ->string (cdr m))))
(else (list egg))))
eggs)
- string=?)))
+ same?)))
(unless (lset= same? eggs eggs2)
(print "mapped " eggs " to " eggs2))
eggs2))
Trap