summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Beckingsale <davidbeckingsale@gmail.com>2016-02-12 09:33:19 -0800
committerDavid Beckingsale <davidbeckingsale@gmail.com>2016-02-12 09:33:19 -0800
commit90e1b1f0ea4320a5bdc0f54ec14a12fdda6584ff (patch)
treebe5ec79d8547574aae1a2e67cab3ca2f2e7d14f0
parentbcf705b85e82509a5045a52a3420893c5546ee7f (diff)
downloadspack-90e1b1f0ea4320a5bdc0f54ec14a12fdda6584ff.tar.gz
spack-90e1b1f0ea4320a5bdc0f54ec14a12fdda6584ff.tar.bz2
spack-90e1b1f0ea4320a5bdc0f54ec14a12fdda6584ff.tar.xz
spack-90e1b1f0ea4320a5bdc0f54ec14a12fdda6584ff.zip
Use hash to make shorter module and dotkit names, fixes #433
-rw-r--r--lib/spack/spack/modules.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py
index 7036626e29..c834763564 100644
--- a/lib/spack/spack/modules.py
+++ b/lib/spack/spack/modules.py
@@ -194,12 +194,14 @@ class Dotkit(EnvModule):
@property
def file_name(self):
return join_path(Dotkit.path, self.spec.architecture,
- self.spec.format('$_$@$%@$+$#.dk'))
+ '%s.dk' % self.use_name)
@property
def use_name(self):
- return self.spec.format('$_$@$%@$+$#')
-
+ return "%s-%s-%s-%s-%s" % (self.spec.name, self.spec.version,
+ self.spec.compiler.name,
+ self.spec.compiler.version,
+ self.spec.dag_hash())
def _write(self, dk_file):
# Category
@@ -235,7 +237,10 @@ class TclModule(EnvModule):
@property
def use_name(self):
- return self.spec.format('$_$@$%@$+$#')
+ return "%s-%s-%s-%s-%s" % (self.spec.name, self.spec.version,
+ self.spec.compiler.name,
+ self.spec.compiler.version,
+ self.spec.dag_hash())
def _write(self, m_file):