diff --git a/pkgs/distro-build/add-catalog.rkt b/pkgs/distro-build/add-catalog.rkt index afb671b074..977276b687 100644 --- a/pkgs/distro-build/add-catalog.rkt +++ b/pkgs/distro-build/add-catalog.rkt @@ -8,7 +8,7 @@ (define s (url->string url)) (define l (pkg-config-catalogs)) (unless (member s l) - (apply pkg-config #:set #t + (apply pkg-config-command #:set #t "catalogs" (append l (list s))))) diff --git a/pkgs/drracket-pkgs/drracket/help/private/bug-report-controls.rkt b/pkgs/drracket-pkgs/drracket/help/private/bug-report-controls.rkt index 5c23e109ac..993bc5733c 100644 --- a/pkgs/drracket-pkgs/drracket/help/private/bug-report-controls.rkt +++ b/pkgs/drracket-pkgs/drracket/help/private/bug-report-controls.rkt @@ -450,7 +450,7 @@ (parameterize ([current-output-port pkg-info-sp]) (with-handlers ([exn:fail? (lambda (exn) (printf "ERROR:\n~a" (exn-message exn)))]) - (pkg-show))) + (pkg-show-command))) (send (send pkg-info get-editor) insert (get-output-string pkg-info-sp)) diff --git a/pkgs/drracket-pkgs/drracket/pkg/gui/by-installed.rkt b/pkgs/drracket-pkgs/drracket/pkg/gui/by-installed.rkt index 23d3ce3f81..4ebbb5f751 100644 --- a/pkgs/drracket-pkgs/drracket/pkg/gui/by-installed.rkt +++ b/pkgs/drracket-pkgs/drracket/pkg/gui/by-installed.rkt @@ -87,7 +87,7 @@ (string-constant install-pkg-abort-remove) (lambda () (apply - pkg-remove + pkg-remove-command #:scope scope names))) (reset-installed-list!)))])) @@ -104,7 +104,7 @@ (string-constant install-pkg-abort-update) (lambda () (apply - pkg-update + pkg-update-command #:scope scope names))) (reset-installed-list!))])) diff --git a/pkgs/drracket-pkgs/drracket/pkg/gui/by-list.rkt b/pkgs/drracket-pkgs/drracket/pkg/gui/by-list.rkt index 97892fd8be..c88422ebff 100644 --- a/pkgs/drracket-pkgs/drracket/pkg/gui/by-list.rkt +++ b/pkgs/drracket-pkgs/drracket/pkg/gui/by-list.rkt @@ -180,7 +180,7 @@ (string-constant install-pkg-abort-install)) (lambda () (apply - (if first-inst pkg-update pkg-install) + (if first-inst pkg-update-command pkg-install-command) #:scope (and first-inst (car first-inst)) names))) diff --git a/pkgs/drracket-pkgs/drracket/pkg/gui/by-source.rkt b/pkgs/drracket-pkgs/drracket/pkg/gui/by-source.rkt index 6e11fd40dd..bb413f0214 100644 --- a/pkgs/drracket-pkgs/drracket/pkg/gui/by-source.rkt +++ b/pkgs/drracket-pkgs/drracket/pkg/gui/by-source.rkt @@ -120,8 +120,8 @@ [(update) (string-constant install-pkg-abort-update)]) (lambda () (define action (case (car res) - [(install) pkg-install] - [(update) pkg-update])) + [(install) pkg-install-command] + [(update) pkg-update-command])) (apply action (cdr res)))) (reset-installed-pkgs!))])) @@ -199,7 +199,7 @@ (in-terminal (lambda () (define scope (selected-scope)) - (pkg-config #:scope 'installation #:set #t "default-scope" (~a scope)) + (pkg-config-command #:scope 'installation #:set #t "default-scope" (~a scope)) (printf "Default scope successfully changed to ~a" scope))) (adjust-all))])) (define inferred-scope-msg-parent (new horizontal-panel% diff --git a/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrbl b/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrbl index 872517318f..2ba065045e 100644 --- a/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrbl +++ b/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrbl @@ -521,14 +521,14 @@ The @racketmodname[pkg] module provides a programmatic interface to the command sub-sub-commands. @deftogether[ - (@defthing[pkg-install procedure?] - @defthing[pkg-update procedure?] - @defthing[pkg-remove procedure?] - @defthing[pkg-show procedure?] - @defthing[pkg-config procedure?] - @defthing[pkg-create procedure?] - @defthing[pkg-catalog-show procedure?] - @defthing[pkg-catalog-copy procedure?]) + (@defthing[pkg-install-command procedure?] + @defthing[pkg-update-command procedure?] + @defthing[pkg-remove-command procedure?] + @defthing[pkg-show-command procedure?] + @defthing[pkg-config-command procedure?] + @defthing[pkg-create-command procedure?] + @defthing[pkg-catalog-show-command procedure?] + @defthing[pkg-catalog-copy-command procedure?]) ]{ Duplicates the @seclink["cmdline"]{command line interface}. diff --git a/racket/lib/collects/pkg/commands.rkt b/racket/lib/collects/pkg/commands.rkt index 7824509c02..3b48acd4ca 100644 --- a/racket/lib/collects/pkg/commands.rkt +++ b/racket/lib/collects/pkg/commands.rkt @@ -117,16 +117,17 @@ (define-syntax (commands stx) (syntax-parse stx - [(_ main-doc:expr export-prefix:id c:command ...) + [(_ main-doc:expr export-format:str c:command ...) (with-syntax ([(export-names ...) - (map (λ (x) (string->symbol (format "~a~a" - (syntax-e #'export-prefix) - (syntax-e x)))) + (map (λ (x) + #`[#,x + #,(string->symbol (format (syntax-e #'export-format) + (syntax-e x)))]) (syntax->list #'(c.name ...)))]) (syntax/loc stx (begin c.function ... - (provide export-names ...) + (provide (rename-out export-names ...)) (module+ main c.variables ... (svn-style-command-line diff --git a/racket/lib/collects/pkg/main.rkt b/racket/lib/collects/pkg/main.rkt index 2d5deff114..a40d4f14af 100644 --- a/racket/lib/collects/pkg/main.rkt +++ b/racket/lib/collects/pkg/main.rkt @@ -51,7 +51,7 @@ (commands "This tool is used for managing installed packages." - pkg- + "pkg-~a-command" [install "Install packages" #:once-each