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:
		| @@ -349,7 +349,7 @@ def install_status(): | ||||
|         "-I", | ||||
|         "--install-status", | ||||
|         action="store_true", | ||||
|         default=False, | ||||
|         default=True, | ||||
|         help="show install status of packages. packages can be: " | ||||
|         "installed [+], missing and needed by an installed package [-], " | ||||
|         "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 | ||||
| def no_checksum(): | ||||
|     return Args( | ||||
|   | ||||
| @@ -44,7 +44,11 @@ def setup_parser(subparser): | ||||
|     ) | ||||
| 
 | ||||
|     # 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( | ||||
|         "-y", | ||||
|         "--yaml", | ||||
|   | ||||
| @@ -31,7 +31,11 @@ def setup_parser(subparser): | ||||
| for further documentation regarding the spec syntax, see: | ||||
|     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.add_argument( | ||||
|         "-y", | ||||
|   | ||||
| @@ -157,7 +157,7 @@ def _parse_types(string): | ||||
| 
 | ||||
| 
 | ||||
| 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) | ||||
| 
 | ||||
|     assert types["dt-diamond"] == ["    "] | ||||
| @@ -167,7 +167,7 @@ def test_spec_deptypes_nodes(): | ||||
| 
 | ||||
| 
 | ||||
| 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) | ||||
| 
 | ||||
|     assert types["dt-diamond"] == ["    "] | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Greg Becker
					Greg Becker