summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/spack/cmd/uninstall.py6
-rw-r--r--lib/spack/spack/test/cmd/uninstall.py6
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py
index 7aadd254e8..231c6fe661 100644
--- a/lib/spack/spack/cmd/uninstall.py
+++ b/lib/spack/spack/cmd/uninstall.py
@@ -62,7 +62,7 @@ def setup_parser(subparser):
"supplied spec. i.e., if you say uninstall libelf, ALL versions of " +
"libelf are uninstalled. This is both useful and dangerous, like rm -r.")
subparser.add_argument(
- '-r', '--recursive', action='store_true', dest='recursive',
+ '-d', '--dependents', action='store_true', dest='dependents',
help='Also uninstall any packages that depend on the ones given via command line.'
)
subparser.add_argument(
@@ -168,7 +168,7 @@ def uninstall(parser, args):
# Process dependent_list and update uninstall_list
has_error = False
- if dependent_list and not args.recursive and not args.force:
+ if dependent_list and not args.dependents and not args.force:
for spec, lst in dependent_list.items():
tty.error("Will not uninstall %s" % spec.format("$_$@$%@$#", color=True))
print('')
@@ -176,7 +176,7 @@ def uninstall(parser, args):
display_specs(lst, long=True)
print('')
has_error = True
- elif args.recursive:
+ elif args.dependents:
for key, lst in dependent_list.items():
uninstall_list.extend(lst)
uninstall_list = list(set(uninstall_list))
diff --git a/lib/spack/spack/test/cmd/uninstall.py b/lib/spack/spack/test/cmd/uninstall.py
index 06a24e2958..80efe06d36 100644
--- a/lib/spack/spack/test/cmd/uninstall.py
+++ b/lib/spack/spack/test/cmd/uninstall.py
@@ -4,11 +4,11 @@ from spack.cmd.uninstall import uninstall
class MockArgs(object):
- def __init__(self, packages, all=False, force=False, recursive=False):
+ def __init__(self, packages, all=False, force=False, dependents=False):
self.packages = packages
self.all = all
self.force = force
- self.recursive = recursive
+ self.dependents = dependents
self.yes_to_all = True
@@ -22,7 +22,7 @@ class TestUninstall(spack.test.mock_database.MockDatabase):
args = MockArgs(['libelf'])
self.assertRaises(SystemExit, uninstall, parser, args)
# Recursive uninstall
- args = MockArgs(['callpath'], all=True, recursive=True)
+ args = MockArgs(['callpath'], all=True, dependents=True)
uninstall(parser, args)
all_specs = spack.install_layout.all_specs()