[PATCH] Add binary version to cache path to avoid multiple chicken installations using the same location

Lilianna Smólska via Chicken-users <[email protected]>
Newsgroups gmane.lisp.scheme.chicken
Message-ID <[email protected]>
I don't know whether this patch is needed at all, maybe chicken-install detects differing versions of eggs automagically? I'm not familiar with its internals – but I have multiple chicken versions installed alongside each other and noticed that they all use the same ~/.cache/chicken-install/ directory. This patch makes chicken 6 instead use ~/.cache/chicken-install/12/, which is also future-proof for changing binary-version values.
I'm not sure how to get the email service I use to work with git, so I am attaching a plain diff below and as a MIME attachment.
diff --git a/egg-environment.scm b/egg-environment.scm
index ee68df7c..77e14299 100644
--- a/egg-environment.scm
+++ b/egg-environment.scm
@@ -123,7 +123,9 @@ EOF
       (string-append (or (system-cache-directory)
                           (current-directory))
                      "/"
-                      chicken-install-program)))
+                      chicken-install-program
+                      "/"
+                      (number->string binary-version))))
 
(define cache-metadata-directory
   ;; Directory where the VERSION, TIMESTAMP and STATUS files are
0001-Add-binary-version-to-cache-path-to-avoid-multiple-c.patch (application/octet-stream, 572 B)
diff --git a/egg-environment.scm b/egg-environment.scm
index ee68df7c..77e14299 100644
--- a/egg-environment.scm
+++ b/egg-environment.scm
@@ -123,7 +123,9 @@ EOF
       (string-append (or (system-cache-directory)
                           (current-directory))
                      "/"
-                      chicken-install-program)))
+                      chicken-install-program
+                      "/"
+                      (number->string binary-version))))
 
 (define cache-metadata-directory
   ;; Directory where the VERSION, TIMESTAMP and STATUS files are
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.