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
74fb1029
Commit
74fb1029
authored
9 years ago
by
Massimiliano Culpo
Committed by
Todd Gamblin
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
uninstall : removed global lock
parent
b3a6e307
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/spack/spack/cmd/uninstall.py
+9
-11
9 additions, 11 deletions
lib/spack/spack/cmd/uninstall.py
lib/spack/spack/package.py
+6
-5
6 additions, 5 deletions
lib/spack/spack/package.py
with
15 additions
and
16 deletions
lib/spack/spack/cmd/uninstall.py
+
9
−
11
View file @
74fb1029
...
@@ -193,16 +193,14 @@ def uninstall(parser, args):
...
@@ -193,16 +193,14 @@ def uninstall(parser, args):
if
not
args
.
packages
and
not
args
.
all
:
if
not
args
.
packages
and
not
args
.
all
:
tty
.
die
(
"
uninstall requires at least one package argument.
"
)
tty
.
die
(
"
uninstall requires at least one package argument.
"
)
with
spack
.
installed_db
.
write_transaction
():
uninstall_list
=
get_uninstall_list
(
args
)
uninstall_list
=
get_uninstall_list
(
args
)
if
not
args
.
yes_to_all
:
tty
.
msg
(
"
The following packages will be uninstalled :
"
)
print
(
''
)
spack
.
cmd
.
display_specs
(
uninstall_list
,
**
display_args
)
print
(
''
)
spack
.
cmd
.
ask_for_confirmation
(
'
Do you want to proceed ?
'
)
if
not
args
.
yes_to_all
:
# Uninstall everything on the list
tty
.
msg
(
"
The following packages will be uninstalled :
"
)
do_uninstall
(
uninstall_list
,
args
.
force
)
print
(
''
)
spack
.
cmd
.
display_specs
(
uninstall_list
,
**
display_args
)
print
(
''
)
spack
.
cmd
.
ask_for_confirmation
(
'
Do you want to proceed ?
'
)
# Uninstall everything on the list
do_uninstall
(
uninstall_list
,
args
.
force
)
This diff is collapsed.
Click to expand it.
lib/spack/spack/package.py
+
6
−
5
View file @
74fb1029
...
@@ -1306,11 +1306,12 @@ def do_uninstall(self, force=False):
...
@@ -1306,11 +1306,12 @@ def do_uninstall(self, force=False):
raise
PackageStillNeededError
(
self
.
spec
,
dependents
)
raise
PackageStillNeededError
(
self
.
spec
,
dependents
)
# Pre-uninstall hook runs first.
# Pre-uninstall hook runs first.
spack
.
hooks
.
pre_uninstall
(
self
)
with
self
.
_prefix_write_lock
():
spack
.
hooks
.
pre_uninstall
(
self
)
# Uninstalling in Spack only requires removing the prefix.
# Uninstalling in Spack only requires removing the prefix.
self
.
remove_prefix
()
self
.
remove_prefix
()
spack
.
installed_db
.
remove
(
self
.
spec
)
#
spack
.
installed_db
.
remove
(
self
.
spec
)
tty
.
msg
(
"
Successfully uninstalled %s
"
%
self
.
spec
.
short_spec
)
tty
.
msg
(
"
Successfully uninstalled %s
"
%
self
.
spec
.
short_spec
)
# Once everything else is done, run post install hooks
# Once everything else is done, run post install hooks
...
...
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