From b22b23a8aaecf5df5128073d3b0131790581ae1b Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 17 Aug 2013 11:29:30 -0600 Subject: [PATCH] fix GUI package manager by-source install Closes PR 13970 --- .../gui-pkg-manager-lib/pkg/gui/by-source.rkt | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/pkgs/gui-pkg-manager-pkgs/gui-pkg-manager-lib/pkg/gui/by-source.rkt b/pkgs/gui-pkg-manager-pkgs/gui-pkg-manager-lib/pkg/gui/by-source.rkt index 77eedeb4b0..18f4f0e847 100644 --- a/pkgs/gui-pkg-manager-pkgs/gui-pkg-manager-lib/pkg/gui/by-source.rkt +++ b/pkgs/gui-pkg-manager-pkgs/gui-pkg-manager-lib/pkg/gui/by-source.rkt @@ -138,7 +138,7 @@ (define action (case (car res) [(install) pkg-install-command] [(update) pkg-update-command])) - (apply action (cdr res)))) + (apply/keywords action (cdr res)))) (reset-installed-pkgs!))])) (define/private (reset-installed-pkgs!) @@ -469,5 +469,24 @@ (define/override (on-superwindow-show on?) (when on? (reset-installed-pkgs!))) + + ;; Pull keyword arguments out of the list `all-args'; + ;; assumes that no keyword is intended as an argument value. + ;; (This seems ugly.) + (define/private (apply/keywords proc all-args) + (define-values (args kws kw-vals) + (let loop ([args all-args] [rev-args null] [kws+vals null]) + (cond + [(null? args) + (let ([kws+vals (sort kws+vals keyword