summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/aspell/package.py14
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()