~ chicken-core (chicken-5) d90426ad6b6402c86cddb1bd84db72014869d07b
commit d90426ad6b6402c86cddb1bd84db72014869d07b
Author: Christian Kellermann <ckeen@pestilenz.org>
AuthorDate: Sun Sep 27 12:16:59 2015 +0200
Commit: Christian Kellermann <ckeen@pestilenz.org>
CommitDate: Sun Sep 27 12:40:38 2015 +0200
Avoid adding runtime prefix on destination prefix
When using the prefix option (-p) on chicken-install the runtime prefix
and destination prefix are set to the same value. Without this patch
both get added to the file paths in the setup-info files.
This fixes bug #1220. (Thanks to ryslash for reporting this issue)
diff --git a/setup-api.scm b/setup-api.scm
index 0fdfc1e8..28c51ae6 100644
--- a/setup-api.scm
+++ b/setup-api.scm
@@ -439,10 +439,13 @@
(when (and (eq? (software-version) 'macosx)
(equal? (cadr static) from)
(equal? (pathname-extension to) "a"))
- (run (,*ranlib-command* ,(shellpath to)) ) ))
- (if (deployment-mode)
- f
- (or (target-prefix to) to))))
+ (run (,*ranlib-command* ,(shellpath to)) ) ))
+ (cond ((deployment-mode) f)
+ ((and (not (equal? (destination-prefix) (runtime-prefix))))
+ ;; we did not append a prefix already
+ (target-prefix to))
+ ;; There's been destination-prefix added before
+ (else to))))
files) ) )
(write-info id dests (supply-version info #f)) ) ) )
Trap