raco pkg {install,update}: add a `--auto' shorthand
This commit is contained in:
parent
f39910aff6
commit
89e99657dd
|
@ -289,6 +289,8 @@ sub-commands.
|
||||||
@item{@exec{search-auto} --- Like @exec{search-ask}, but does not ask for permission to install or update.}
|
@item{@exec{search-auto} --- Like @exec{search-ask}, but does not ask for permission to install or update.}
|
||||||
]}
|
]}
|
||||||
|
|
||||||
|
@item{@DFlag{auto} --- Shorthand for @exec{@DFlag{deps} search-auto}.}
|
||||||
|
|
||||||
@item{@DFlag{force} --- Ignores conflicts (unsafe).}
|
@item{@DFlag{force} --- Ignores conflicts (unsafe).}
|
||||||
|
|
||||||
@item{@DFlag{ignore-checksums} --- Ignores errors verifying package @tech{checksums} (unsafe).}
|
@item{@DFlag{ignore-checksums} --- Ignores errors verifying package @tech{checksums} (unsafe).}
|
||||||
|
@ -357,9 +359,10 @@ the given @nonterm{pkg}s.
|
||||||
the following @nonterm{option}s:
|
the following @nonterm{option}s:
|
||||||
|
|
||||||
@itemlist[
|
@itemlist[
|
||||||
@item{@DFlag{deps} @nonterm{behavior} --- Same as for @command-ref{install}.}
|
|
||||||
@item{@DFlag{all} or @Flag{a} --- Update all packages, if no packages are given in the argument list.}
|
@item{@DFlag{all} or @Flag{a} --- Update all packages, if no packages are given in the argument list.}
|
||||||
@item{@DFlag{update-deps} --- Checks the named packages, and their dependencies (transitively) for updates.}
|
@item{@DFlag{update-deps} --- Checks the named packages plus their dependencies (transitively) for updates.}
|
||||||
|
@item{@DFlag{deps} @nonterm{behavior} --- Same as for @command-ref{install}.}
|
||||||
|
@item{@DFlag{auto} --- Shorthand for @exec{@DFlag{deps} search-auto} plus @DFlag{update-deps}.}
|
||||||
@item{@DFlag{scope} @nonterm{scope} --- Selects a @tech{package scope}, the same as for @command-ref{install}.}
|
@item{@DFlag{scope} @nonterm{scope} --- Selects a @tech{package scope}, the same as for @command-ref{install}.}
|
||||||
@item{@Flag{i} or @DFlag{installation} --- Shorthand for @exec{--scope installation}.}
|
@item{@Flag{i} or @DFlag{installation} --- Shorthand for @exec{--scope installation}.}
|
||||||
@item{@Flag{u} or @DFlag{user} --- Shorthand for @exec{--scope user}.}
|
@item{@Flag{u} or @DFlag{user} --- Shorthand for @exec{--scope user}.}
|
||||||
|
|
|
@ -95,7 +95,7 @@
|
||||||
"if not specified, the type is inferred syntactically")]
|
"if not specified, the type is inferred syntactically")]
|
||||||
[(#:str name #f) name ("-n") ("Name of package, instead of inferred"
|
[(#:str name #f) name ("-n") ("Name of package, instead of inferred"
|
||||||
"(makes sense only when a single <pkg-source> is given)")]
|
"(makes sense only when a single <pkg-source> is given)")]
|
||||||
#:once-each
|
#:once-any
|
||||||
[(#:sym mode [fail force search-ask search-auto] #f) deps ()
|
[(#:sym mode [fail force search-ask search-auto] #f) deps ()
|
||||||
("Specify the behavior for dependencies, with <mode> as one of"
|
("Specify the behavior for dependencies, with <mode> as one of"
|
||||||
" fail: cancels the installation if dependencies are unmet"
|
" fail: cancels the installation if dependencies are unmet"
|
||||||
|
@ -105,6 +105,8 @@
|
||||||
" (default if package is a package name) and asks if you would"
|
" (default if package is a package name) and asks if you would"
|
||||||
" like it installed"
|
" like it installed"
|
||||||
" search-auto: like 'search-ask' but does not ask for permission to install")]
|
" search-auto: like 'search-ask' but does not ask for permission to install")]
|
||||||
|
[#:bool auto () "Shorthand for `--deps search-auto'"]
|
||||||
|
#:once-each
|
||||||
[#:bool force () "Ignores conflicts"]
|
[#:bool force () "Ignores conflicts"]
|
||||||
[#:bool ignore-checksums () "Ignores checksums"]
|
[#:bool ignore-checksums () "Ignores checksums"]
|
||||||
#:once-any
|
#:once-any
|
||||||
|
@ -140,7 +142,7 @@
|
||||||
(parameterize ([current-pkg-catalogs (and catalog
|
(parameterize ([current-pkg-catalogs (and catalog
|
||||||
(list (catalog->url catalog)))])
|
(list (catalog->url catalog)))])
|
||||||
(define link-dirs? (not (or copy source binary)))
|
(define link-dirs? (not (or copy source binary)))
|
||||||
(pkg-install #:dep-behavior deps
|
(pkg-install #:dep-behavior (if auto 'search-auto deps)
|
||||||
#:force? force
|
#:force? force
|
||||||
#:ignore-checksums? ignore-checksums
|
#:ignore-checksums? ignore-checksums
|
||||||
#:skip-installed? skip-installed
|
#:skip-installed? skip-installed
|
||||||
|
@ -158,6 +160,8 @@
|
||||||
#:once-each
|
#:once-each
|
||||||
[#:bool all ("-a") ("Update all packages;"
|
[#:bool all ("-a") ("Update all packages;"
|
||||||
"only if no packages are given on the command line")]
|
"only if no packages are given on the command line")]
|
||||||
|
[#:bool update-deps () "Check named packages' dependencies for updates"]
|
||||||
|
#:once-any
|
||||||
[(#:sym mode [fail force search-ask search-auto] #f) deps ()
|
[(#:sym mode [fail force search-ask search-auto] #f) deps ()
|
||||||
("Specify the behavior for dependencies, with <mode> as one of"
|
("Specify the behavior for dependencies, with <mode> as one of"
|
||||||
" fail: cancels the installation if dependencies are unmet"
|
" fail: cancels the installation if dependencies are unmet"
|
||||||
|
@ -167,7 +171,7 @@
|
||||||
" (default if package is an package name) and asks if you would"
|
" (default if package is an package name) and asks if you would"
|
||||||
" like it installed"
|
" like it installed"
|
||||||
" search-auto: like 'search-ask' but does not ask for permission to install")]
|
" search-auto: like 'search-ask' but does not ask for permission to install")]
|
||||||
[#:bool update-deps () "Check named packages' dependencies for updates"]
|
[#:bool auto () "Shorthand for `--deps search-auto' plus `--update-deps'"]
|
||||||
#:once-any
|
#:once-any
|
||||||
[(#:sym scope [installation user] #f) scope ()
|
[(#:sym scope [installation user] #f) scope ()
|
||||||
("Select package scope, one of"
|
("Select package scope, one of"
|
||||||
|
@ -192,8 +196,8 @@
|
||||||
(with-pkg-lock
|
(with-pkg-lock
|
||||||
(pkg-update pkg
|
(pkg-update pkg
|
||||||
#:all? all
|
#:all? all
|
||||||
#:dep-behavior deps
|
#:dep-behavior (if auto 'search-auto deps)
|
||||||
#:deps? update-deps
|
#:deps? (or update-deps auto)
|
||||||
#:strip (or (and source 'source) (and binary 'binary)))))
|
#:strip (or (and source 'source) (and binary 'binary)))))
|
||||||
(setup no-setup setup-collects jobs)))]
|
(setup no-setup setup-collects jobs)))]
|
||||||
[remove
|
[remove
|
||||||
|
|
Loading…
Reference in New Issue
Block a user