install status arg: update to default true and add inverse (#38252)
* install status arg: update to default true and add inverse * update bash completion * fix tests broken by output change
This commit is contained in:
parent
ee106c747f
commit
3c672905d0
5 changed files with 26 additions and 7 deletions
|
@ -349,7 +349,7 @@ def install_status():
|
||||||
"-I",
|
"-I",
|
||||||
"--install-status",
|
"--install-status",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
default=False,
|
default=True,
|
||||||
help="show install status of packages. packages can be: "
|
help="show install status of packages. packages can be: "
|
||||||
"installed [+], missing and needed by an installed package [-], "
|
"installed [+], missing and needed by an installed package [-], "
|
||||||
"installed in and upstream instance [^], "
|
"installed in and upstream instance [^], "
|
||||||
|
@ -357,6 +357,17 @@ def install_status():
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@arg
|
||||||
|
def no_install_status():
|
||||||
|
return Args(
|
||||||
|
"--no-install-status",
|
||||||
|
dest="install_status",
|
||||||
|
action="store_false",
|
||||||
|
default=True,
|
||||||
|
help="do not show install status annotations",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@arg
|
@arg
|
||||||
def no_checksum():
|
def no_checksum():
|
||||||
return Args(
|
return Args(
|
||||||
|
|
|
@ -44,7 +44,11 @@ def setup_parser(subparser):
|
||||||
)
|
)
|
||||||
|
|
||||||
# Below are arguments w.r.t. spec display (like spack spec)
|
# Below are arguments w.r.t. spec display (like spack spec)
|
||||||
arguments.add_common_arguments(subparser, ["long", "very_long", "install_status"])
|
arguments.add_common_arguments(subparser, ["long", "very_long"])
|
||||||
|
|
||||||
|
install_status_group = subparser.add_mutually_exclusive_group()
|
||||||
|
arguments.add_common_arguments(install_status_group, ["install_status", "no_install_status"])
|
||||||
|
|
||||||
subparser.add_argument(
|
subparser.add_argument(
|
||||||
"-y",
|
"-y",
|
||||||
"--yaml",
|
"--yaml",
|
||||||
|
|
|
@ -31,7 +31,11 @@ def setup_parser(subparser):
|
||||||
for further documentation regarding the spec syntax, see:
|
for further documentation regarding the spec syntax, see:
|
||||||
spack help --spec
|
spack help --spec
|
||||||
"""
|
"""
|
||||||
arguments.add_common_arguments(subparser, ["long", "very_long", "install_status"])
|
arguments.add_common_arguments(subparser, ["long", "very_long"])
|
||||||
|
|
||||||
|
install_status_group = subparser.add_mutually_exclusive_group()
|
||||||
|
arguments.add_common_arguments(install_status_group, ["install_status", "no_install_status"])
|
||||||
|
|
||||||
format_group = subparser.add_mutually_exclusive_group()
|
format_group = subparser.add_mutually_exclusive_group()
|
||||||
format_group.add_argument(
|
format_group.add_argument(
|
||||||
"-y",
|
"-y",
|
||||||
|
|
|
@ -157,7 +157,7 @@ def _parse_types(string):
|
||||||
|
|
||||||
|
|
||||||
def test_spec_deptypes_nodes():
|
def test_spec_deptypes_nodes():
|
||||||
output = spec("--types", "--cover", "nodes", "dt-diamond")
|
output = spec("--types", "--cover", "nodes", "--no-install-status", "dt-diamond")
|
||||||
types = _parse_types(output)
|
types = _parse_types(output)
|
||||||
|
|
||||||
assert types["dt-diamond"] == [" "]
|
assert types["dt-diamond"] == [" "]
|
||||||
|
@ -167,7 +167,7 @@ def test_spec_deptypes_nodes():
|
||||||
|
|
||||||
|
|
||||||
def test_spec_deptypes_edges():
|
def test_spec_deptypes_edges():
|
||||||
output = spec("--types", "--cover", "edges", "dt-diamond")
|
output = spec("--types", "--cover", "edges", "--no-install-status", "dt-diamond")
|
||||||
types = _parse_types(output)
|
types = _parse_types(output)
|
||||||
|
|
||||||
assert types["dt-diamond"] == [" "]
|
assert types["dt-diamond"] == [" "]
|
||||||
|
|
|
@ -1695,7 +1695,7 @@ _spack_restage() {
|
||||||
_spack_solve() {
|
_spack_solve() {
|
||||||
if $list_options
|
if $list_options
|
||||||
then
|
then
|
||||||
SPACK_COMPREPLY="-h --help --show -l --long -L --very-long -I --install-status -y --yaml -j --json -c --cover -N --namespaces -t --types --timers --stats -U --fresh --reuse --reuse-deps"
|
SPACK_COMPREPLY="-h --help --show -l --long -L --very-long -I --install-status --no-install-status -y --yaml -j --json -c --cover -N --namespaces -t --types --timers --stats -U --fresh --reuse --reuse-deps"
|
||||||
else
|
else
|
||||||
_all_packages
|
_all_packages
|
||||||
fi
|
fi
|
||||||
|
@ -1704,7 +1704,7 @@ _spack_solve() {
|
||||||
_spack_spec() {
|
_spack_spec() {
|
||||||
if $list_options
|
if $list_options
|
||||||
then
|
then
|
||||||
SPACK_COMPREPLY="-h --help -l --long -L --very-long -I --install-status -y --yaml -j --json --format -c --cover -N --namespaces -t --types -U --fresh --reuse --reuse-deps"
|
SPACK_COMPREPLY="-h --help -l --long -L --very-long -I --install-status --no-install-status -y --yaml -j --json --format -c --cover -N --namespaces -t --types -U --fresh --reuse --reuse-deps"
|
||||||
else
|
else
|
||||||
_all_packages
|
_all_packages
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue