Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Spack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eic_tools
Spack
Commits
401dcb36
Commit
401dcb36
authored
9 years ago
by
Massimiliano Culpo
Browse files
Options
Downloads
Patches
Plain Diff
uninstall : renamed `--recursive` to `--dependents`
parent
4f6320a7
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/spack/spack/cmd/uninstall.py
+3
-3
3 additions, 3 deletions
lib/spack/spack/cmd/uninstall.py
lib/spack/spack/test/cmd/uninstall.py
+3
-3
3 additions, 3 deletions
lib/spack/spack/test/cmd/uninstall.py
with
6 additions
and
6 deletions
lib/spack/spack/cmd/uninstall.py
+
3
−
3
View file @
401dcb36
...
...
@@ -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
))
...
...
This diff is collapsed.
Click to expand it.
lib/spack/spack/test/cmd/uninstall.py
+
3
−
3
View file @
401dcb36
...
...
@@ -4,11 +4,11 @@
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 @@ def test_uninstall(self):
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
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment