change exports from the 'pkg' module so they are all prefixed with pkg-
(the goal is to avoid shadowing 'remove')
This commit is contained in:
parent
81f29602d0
commit
dfafc9675e
|
@ -8,7 +8,7 @@
|
|||
(define s (url->string url))
|
||||
(define l (pkg-config-catalogs))
|
||||
(unless (member s l)
|
||||
(apply config #:set #t
|
||||
(apply pkg-config #:set #t
|
||||
"catalogs"
|
||||
(append l (list s)))))
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
setup/dirs
|
||||
setup/link
|
||||
framework
|
||||
(prefix-in pkg: pkg)
|
||||
pkg
|
||||
(for-syntax racket/base
|
||||
racket/list)
|
||||
"buginfo.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)))
|
||||
(send (send pkg-info get-editor)
|
||||
insert
|
||||
(get-output-string pkg-info-sp))
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
racket/gui/base
|
||||
racket/format
|
||||
pkg/lib
|
||||
(prefix-in pkg: pkg)
|
||||
pkg
|
||||
string-constants
|
||||
"common.rkt")
|
||||
|
||||
|
@ -87,7 +87,7 @@
|
|||
(string-constant install-pkg-abort-remove)
|
||||
(lambda ()
|
||||
(apply
|
||||
pkg:remove
|
||||
pkg-remove
|
||||
#:scope scope
|
||||
names)))
|
||||
(reset-installed-list!)))]))
|
||||
|
@ -104,7 +104,7 @@
|
|||
(string-constant install-pkg-abort-update)
|
||||
(lambda ()
|
||||
(apply
|
||||
pkg:update
|
||||
pkg-update
|
||||
#:scope scope
|
||||
names)))
|
||||
(reset-installed-list!))]))
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
string-constants
|
||||
net/url
|
||||
pkg/lib
|
||||
(prefix-in pkg: pkg)
|
||||
pkg
|
||||
(prefix-in db: pkg/db)
|
||||
"common.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 pkg-install)
|
||||
#:scope (and first-inst
|
||||
(car first-inst))
|
||||
names)))
|
||||
|
@ -201,7 +201,7 @@
|
|||
(string-constant install-pkg-abort-remove)
|
||||
(lambda ()
|
||||
(apply
|
||||
pkg:remove
|
||||
pkg-remove
|
||||
#:scope scope
|
||||
names)))
|
||||
(set-box! s #f)
|
||||
|
|
|
@ -120,8 +120,8 @@
|
|||
[(update) (string-constant install-pkg-abort-update)])
|
||||
(lambda ()
|
||||
(define action (case (car res)
|
||||
[(install) install]
|
||||
[(update) update]))
|
||||
[(install) pkg-install]
|
||||
[(update) pkg-update]))
|
||||
(apply action (cdr res))))
|
||||
(reset-installed-pkgs!))]))
|
||||
|
||||
|
@ -199,7 +199,7 @@
|
|||
(in-terminal
|
||||
(lambda ()
|
||||
(define scope (selected-scope))
|
||||
(config #:scope 'installation #:set #t "default-scope" (~a scope))
|
||||
(pkg-config #: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%
|
||||
|
|
|
@ -521,14 +521,14 @@ The @racketmodname[pkg] module provides a programmatic interface
|
|||
to the command sub-sub-commands.
|
||||
|
||||
@deftogether[
|
||||
(@defthing[install procedure?]
|
||||
@defthing[update procedure?]
|
||||
@defthing[remove procedure?]
|
||||
@defthing[show procedure?]
|
||||
@defthing[config procedure?]
|
||||
@defthing[create procedure?]
|
||||
@defthing[catalog-show procedure?]
|
||||
@defthing[catalog-copy procedure?])
|
||||
(@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?])
|
||||
]{
|
||||
Duplicates the @seclink["cmdline"]{command line interface}.
|
||||
|
||||
|
|
|
@ -117,17 +117,22 @@
|
|||
|
||||
(define-syntax (commands stx)
|
||||
(syntax-parse stx
|
||||
[(_ main-doc:expr c:command ...)
|
||||
[(_ main-doc:expr export-prefix:id c:command ...)
|
||||
(with-syntax ([(export-names ...)
|
||||
(map (λ (x) (string->symbol (format "~a~a"
|
||||
(syntax-e #'export-prefix)
|
||||
(syntax-e x))))
|
||||
(syntax->list #'(c.name ...)))])
|
||||
(syntax/loc stx
|
||||
(begin
|
||||
c.function ...
|
||||
(provide c.name ...)
|
||||
(provide export-names ...)
|
||||
(module+ main
|
||||
c.variables ...
|
||||
(svn-style-command-line
|
||||
#:program (short-program+command-name)
|
||||
#:argv (current-command-line-arguments)
|
||||
main-doc
|
||||
c.command-line ...))))]))
|
||||
c.command-line ...)))))]))
|
||||
|
||||
(provide commands)
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
|
||||
(commands
|
||||
"This tool is used for managing installed packages."
|
||||
pkg-
|
||||
[install
|
||||
"Install packages"
|
||||
#:once-each
|
||||
|
|
Loading…
Reference in New Issue
Block a user