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
73b6214a
Commit
73b6214a
authored
9 years ago
by
Massimiliano Culpo
Browse files
Options
Downloads
Patches
Plain Diff
module files : proper cleanup on uninstall fixes #216
Conflicts: lib/spack/spack/test/database.py
parent
3c8e055e
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/module.py
+2
-8
2 additions, 8 deletions
lib/spack/spack/cmd/module.py
lib/spack/spack/modules.py
+5
-1
5 additions, 1 deletion
lib/spack/spack/modules.py
with
7 additions
and
9 deletions
lib/spack/spack/cmd/module.py
+
2
−
8
View file @
73b6214a
...
@@ -22,21 +22,16 @@
...
@@ -22,21 +22,16 @@
# along with this program; if not, write to the Free Software Foundation,
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
##############################################################################
import
sys
import
os
import
os
import
shutil
import
shutil
import
argparse
import
sys
import
llnl.util.tty
as
tty
import
llnl.util.tty
as
tty
from
llnl.util.lang
import
partition_list
from
llnl.util.filesystem
import
mkdirp
import
spack.cmd
import
spack.cmd
from
llnl.util.filesystem
import
mkdirp
from
spack.modules
import
module_types
from
spack.modules
import
module_types
from
spack.util.string
import
*
from
spack.util.string
import
*
from
spack.spec
import
Spec
description
=
"
Manipulate modules and dotkits.
"
description
=
"
Manipulate modules and dotkits.
"
...
@@ -98,7 +93,6 @@ def module_refresh():
...
@@ -98,7 +93,6 @@ def module_refresh():
cls
(
spec
).
write
()
cls
(
spec
).
write
()
def
module
(
parser
,
args
):
def
module
(
parser
,
args
):
if
args
.
module_command
==
'
refresh
'
:
if
args
.
module_command
==
'
refresh
'
:
module_refresh
()
module_refresh
()
...
...
This diff is collapsed.
Click to expand it.
lib/spack/spack/modules.py
+
5
−
1
View file @
73b6214a
...
@@ -211,7 +211,11 @@ def use_name(self):
...
@@ -211,7 +211,11 @@ def use_name(self):
def
remove
(
self
):
def
remove
(
self
):
mod_file
=
self
.
file_name
mod_file
=
self
.
file_name
if
os
.
path
.
exists
(
mod_file
):
if
os
.
path
.
exists
(
mod_file
):
shutil
.
rmtree
(
mod_file
,
ignore_errors
=
True
)
try
:
os
.
remove
(
mod_file
)
# Remove the module file
os
.
removedirs
(
os
.
path
.
dirname
(
mod_file
))
# Remove all the empty directories from the leaf up
except
OSError
:
pass
# removedirs throws OSError on first non-empty directory found
class
Dotkit
(
EnvModule
):
class
Dotkit
(
EnvModule
):
...
...
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