Hi all, Attached is a pretty straightforward patch to fix #1144. The problem is that we're using "extension-information" while walking the egg list to see which eggs already exist. If extension-information returns a non-#f value, it will be removed from the list.
When using -prefix, extension-information will still look in the system-wide directory. Instead, we had already copied the body of extension-information into "ext-version" so we can determine the version of an egg under the prefix. This patch simply re-uses that procedure to determine if the egg exists under the installation directory. I've done the following tests: - Installing the egg in the prefix with -keep-installed while it's not installed. It's installed. - Installing the egg in the prefix with -keep-installed while it was already installed. It's not installed. - Installing the egg system-wide, then running chicken-install with -keep-installed under a prefix. It's installed. Seems correct to me. Cheers, Peter
From daa9bb4b37f52cfb299d269bb0c85635ec832718 Mon Sep 17 00:00:00 2001 From: Peter Bex <pe...@more-magic.net> Date: Sat, 31 Dec 2016 13:51:12 +0100 Subject: [PATCH] chicken-install's -keep-installed looks in prefix Instead of using "extension-information" to check whether the egg already exists, we use "ext-version" in the filter procedure which decides which eggs to remove from consideration when installing. Ext-version looks under prefix, while extension-information uses the system-wide egg location. Conflicts: chicken-install.scm --- NEWS | 5 +++++ chicken-install.scm | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 38af2d2..aa6d968 100644 --- a/NEWS +++ b/NEWS @@ -80,6 +80,11 @@ in, they are restored (fixes #1336, thanks to Joo ChurlSoo). This was a regression caused by the fix for #1227. +- Tools: + - "chicken-install" + - When installing eggs in deploy mode with {{-keep-installed}}, + eggs under the prefix won't unnecessarily be reinstalled (#1144). + 4.11.1 - Security fixes diff --git a/chicken-install.scm b/chicken-install.scm index 4813226..5e3fd79 100644 --- a/chicken-install.scm +++ b/chicken-install.scm @@ -600,7 +600,7 @@ (when *keep-existing* (set! eggs (filter - (lambda (egg) (not (extension-information (if (pair? egg) (car egg) egg)))) + (lambda (egg) (not (ext-version (if (pair? egg) (car egg) egg)))) eggs))) (retrieve eggs) (unless *retrieve-only* -- 2.1.4
From ea5b66dc9f6368d4773c621406bfe240cc14bf11 Mon Sep 17 00:00:00 2001 From: Peter Bex <pe...@more-magic.net> Date: Sat, 31 Dec 2016 13:48:12 +0100 Subject: [PATCH] chicken-install's -keep-installed looks in prefix Instead of using "extension-information" to check whether the egg already exists, we use "ext-version" in the filter procedure which decides which eggs to remove from consideration when installing. Ext-version looks under prefix, while extension-information uses the system-wide egg location. --- NEWS | 5 +++++ chicken-install.scm | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index ac51659..7f6c960 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,11 @@ in, they are restored (fixes #1336, thanks to Joo ChurlSoo). This was a regression caused by the fix for #1227. +- Tools: + - "chicken-install" + - When installing eggs in deploy mode with {{-keep-installed}}, + eggs under the prefix won't unnecessarily be reinstalled (#1144). + 4.11.1 - Security fixes diff --git a/chicken-install.scm b/chicken-install.scm index 7bc6041..c8d6998 100644 --- a/chicken-install.scm +++ b/chicken-install.scm @@ -582,7 +582,7 @@ (when *keep-existing* (set! eggs (remove - (lambda (egg) (extension-information (if (pair? egg) (car egg) egg))) + (lambda (egg) (ext-version (if (pair? egg) (car egg) egg))) eggs))) (retrieve eggs) (unless *retrieve-only* -- 2.1.4
signature.asc
Description: Digital signature
_______________________________________________ Chicken-hackers mailing list Chicken-hackers@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-hackers