summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoralalazo <massimiliano.culpo@googlemail.com>2016-04-04 10:28:47 +0200
committeralalazo <massimiliano.culpo@googlemail.com>2016-04-04 10:28:47 +0200
commit401dcb363539409e7b94d8ce016bc1a2e70db3a1 (patch)
tree5b705b9d4791fee75e7b0f9c0260cc36e04375cf /lib
parent4f6320a7eb14f7d09c1e31a92d224e54e32c3921 (diff)
downloadspack-401dcb363539409e7b94d8ce016bc1a2e70db3a1.tar.gz
spack-401dcb363539409e7b94d8ce016bc1a2e70db3a1.tar.bz2
spack-401dcb363539409e7b94d8ce016bc1a2e70db3a1.tar.xz
spack-401dcb363539409e7b94d8ce016bc1a2e70db3a1.zip
uninstall : renamed `--recursive` to `--dependents`
Diffstat (limited to 'lib')
-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()