Two very minor patches. The second fixes the following error: $ chicken-install http-client retrieving ... checking platform for `http-client' ... checking dependencies for `http-client' ... The following installed extensions are outdated, because `http-client' requires later versions: intarweb (1.1 -> 1.2) Do you want to replace the existing extensions? (yes/no/abort) no install order: ("intarweb" "http-client") Error: (car) bad argument type: #f
Cheers, Evan
>From 63b09fa91e1da02da9cde187b37cdd1977b6a48c Mon Sep 17 00:00:00 2001 From: Evan Hanson <ev...@foldling.org> Date: Fri, 8 Nov 2013 06:24:02 +1300 Subject: [PATCH 1/2] Properly set the default value ("no") for chicken-install's egg upgrade prompt yes-or-no?'s default value is a keyword argument, but wasn't being passed as one. --- chicken-install.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chicken-install.scm b/chicken-install.scm index 45d8c77..8df8865 100644 --- a/chicken-install.scm +++ b/chicken-install.scm @@ -478,7 +478,7 @@ (or *force* (yes-or-no? (make-replace-extension-question e+d+v upgrade) - "no" + default: "no" abort: (abort-setup) ) ) ) (let ([ueggs (unzip1 upgrade)]) (print " upgrade: " (string-intersperse ueggs ", ")) -- 1.7.10.4
>From d7f7902c87065ec23c796f81c28ac4e902d4e5a3 Mon Sep 17 00:00:00 2001 From: Evan Hanson <ev...@foldling.org> Date: Fri, 8 Nov 2013 06:28:27 +1300 Subject: [PATCH 2/2] Warn and exit when the user declines an egg upgrade during chicken-install This avoids an error when the user declines an egg upgrade, since that extension doesn't go into eggs+dirs+vers but the installation carries on regardless (and its dependency associates to #f where an e+d+v is expected). --- chicken-install.scm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/chicken-install.scm b/chicken-install.scm index 8df8865..7bcac90 100644 --- a/chicken-install.scm +++ b/chicken-install.scm @@ -478,7 +478,7 @@ (or *force* (yes-or-no? (make-replace-extension-question e+d+v upgrade) - default: "no" + default: "no" abort: (abort-setup) ) ) ) (let ([ueggs (unzip1 upgrade)]) (print " upgrade: " (string-intersperse ueggs ", ")) @@ -576,7 +576,13 @@ (unless *retrieve-only* (let* ((dag (reverse (topological-sort *dependencies* string=?))) (num (length dag)) - (depinstall-ok *force*)) + (depinstall-ok *force*) + (eggs+dirs+vers (map (cut assoc <> *eggs+dirs+vers*) dag))) + (and-let* ((ibad (list-index not eggs+dirs+vers))) + ;; A dependency was left unretrieved, most likely because the user declined an upgrade. + (fprintf (current-error-port) "\nUnresolved dependency: ~a\n\n" (list-ref dag ibad)) + (cleanup) + (exit 1)) (print "install order:") (pp dag) (for-each @@ -646,7 +652,7 @@ (print "installing for target ...") (fluid-let ((*host-extension* #f)) (setup tmpcopy))))))) - (map (cut assoc <> *eggs+dirs+vers*) dag) + eggs+dirs+vers (iota num num -1))))) (define (delete-stale-binaries) -- 1.7.10.4
_______________________________________________ Chicken-hackers mailing list Chicken-hackers@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-hackers