>From ab10eb7a1edafee8f27b86c622c5dbba94c6cfdf Mon Sep 17 00:00:00 2001 From: Mario Domenech Goulart Date: Sun, 12 Nov 2023 09:33:49 +0100 Subject: [PATCH 2/2] egg-environment: Add chicken version to the path to chicken-install's cache This is an extra measure to minimize the chances of having cache corruption by mixing caches created by different CHICKEN versions or CHICKENs built with different C compilers. This can happen in, for example, if an egg installed with CHICKENs newer than 2f6a7221 gets cached, and the cached object files get reused if you try to install the same egg with a CHICKEN older than 2f6a7221 (the older CHICKEN won't recognize the newly-named _STATUS file and will reuse the possibly incompatible objects from the cache). Caveats: * "chicken-install -purge" from a CHICKEN older than this commit will purge the cache of all CHICKEN versions. * This solution is not applicable in case users explicitly set CHICKEN_EGG_CACHE. --- NEWS | 2 ++ egg-environment.scm | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index df812c5b..c3c75e9e 100644 --- a/NEWS +++ b/NEWS @@ -55,6 +55,8 @@ (short: -l) to specify local directories where to get egg sources from. - chicken-install now gives a warning on unexpected properties (#1492). + - The path to the chicken-install cache directory now contains the + CHICKEN version. - Syntax expander - When passing a module as an environment to eval, correctly resolve diff --git a/egg-environment.scm b/egg-environment.scm index fa0235a2..94f4e3d8 100644 --- a/egg-environment.scm +++ b/egg-environment.scm @@ -123,6 +123,7 @@ EOF (define cache-directory (or (get-environment-variable "CHICKEN_EGG_CACHE") - (make-pathname (or (system-cache-directory) - (current-directory)) - chicken-install-program))) + (make-pathname (list (or (system-cache-directory) + (current-directory)) + chicken-install-program) + (chicken-version)))) -- 2.39.2