summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2015-02-16 12:41:22 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2015-02-16 12:41:22 -0800
commit614c22fc1b1ac10c85ed9e27a1e59eeb88de0898 (patch)
treef076c2ec1b1f643fc12abc4a5c634ac19beec72b /var
parent8aa3afcfde9cebd34fdb534141c258c214ae4132 (diff)
downloadspack-614c22fc1b1ac10c85ed9e27a1e59eeb88de0898.tar.gz
spack-614c22fc1b1ac10c85ed9e27a1e59eeb88de0898.tar.bz2
spack-614c22fc1b1ac10c85ed9e27a1e59eeb88de0898.tar.xz
spack-614c22fc1b1ac10c85ed9e27a1e59eeb88de0898.zip
Allow forced deactivation -- best effort unlinking
spack deactivate -f will unlink even if Spack thinks the package isn't enabled. Made deactivate routines idempotent.
Diffstat (limited to 'var')
-rw-r--r--var/spack/packages/python/package.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/var/spack/packages/python/package.py b/var/spack/packages/python/package.py
index fb875a7eeb..705d002e80 100644
--- a/var/spack/packages/python/package.py
+++ b/var/spack/packages/python/package.py
@@ -155,5 +155,6 @@ class Python(Package):
super(Python, self).deactivate(ext_pkg, **args)
exts = spack.install_layout.extension_map(self.spec)
- del exts[ext_pkg.name]
- self.write_easy_install_pth(exts)
+ if ext_pkg.name in exts: # Make deactivate idempotent.
+ del exts[ext_pkg.name]
+ self.write_easy_install_pth(exts)