diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2017-10-31 11:39:57 -0400 |
---|---|---|
committer | scheibelp <scheibel1@llnl.gov> | 2017-11-02 18:45:40 -0700 |
commit | be01b2d5f0452a7a5f1cbc5e1d58193c899bc0cc (patch) | |
tree | 2d40b5db9949c6a7149c2ecc75965e4ced332273 /var | |
parent | a81485cb3fa7972549e2163a96cb11fb41088723 (diff) | |
download | spack-be01b2d5f0452a7a5f1cbc5e1d58193c899bc0cc.tar.gz spack-be01b2d5f0452a7a5f1cbc5e1d58193c899bc0cc.tar.bz2 spack-be01b2d5f0452a7a5f1cbc5e1d58193c899bc0cc.tar.xz spack-be01b2d5f0452a7a5f1cbc5e1d58193c899bc0cc.zip |
aspell: refuse to work with non-global extensions
Aspell compiles in the paths it looks for rather than looking relative
to its binary location. There are also no environment variables to
redirect it other than changing the path to the configuration file it
looks at.
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/aspell/package.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/aspell/package.py b/var/spack/repos/builtin/packages/aspell/package.py index 042246bbca..f9dbfdd43c 100644 --- a/var/spack/repos/builtin/packages/aspell/package.py +++ b/var/spack/repos/builtin/packages/aspell/package.py @@ -25,7 +25,7 @@ from spack import * from llnl.util.link_tree import LinkTree import spack.store -from spack.package import ExtensionConflictError +from spack.package import ExtensionError, ExtensionConflictError # See also: AspellDictPackage @@ -47,6 +47,12 @@ class Aspell(AutotoolsPackage): # - extension.prefix.lib instead of extension.prefix in LinkTree() # - dest_dir instead of self.prefix in tree.(find_conflict|merge)() def activate(self, extension, **kwargs): + extensions_layout = kwargs.get("extensions_layout", + spack.store.extensions) + if extensions_layout is not spack.store.extensions: + raise ExtensionError( + 'aspell does not support non-global extensions') + aspell = which(self.prefix.bin.aspell) dest_dir = aspell('dump', 'config', 'dict-dir', output=str).strip() tree = LinkTree(extension.prefix.lib) @@ -62,6 +68,12 @@ class Aspell(AutotoolsPackage): tree.merge(dest_dir, ignore=ignore) def deactivate(self, extension, **kwargs): + extensions_layout = kwargs.get("extensions_layout", + spack.store.extensions) + if extensions_layout is not spack.store.extensions: + raise ExtensionError( + 'aspell does not support non-global extensions') + aspell = which(self.prefix.bin.aspell) dest_dir = aspell('dump', 'config', 'dict-dir', output=str).strip() |