diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2015-09-27 16:52:38 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2015-09-27 17:01:35 -0700 |
commit | adbd393c390dd78dca6cdb986ae72835dc1bf8b1 (patch) | |
tree | 1c2fd81236bdeab0179466e15df1334ef34a0582 | |
parent | 6d4eed38457444d9b2b2b29b43d4c38c2fbb11d6 (diff) | |
download | spack-adbd393c390dd78dca6cdb986ae72835dc1bf8b1.tar.gz spack-adbd393c390dd78dca6cdb986ae72835dc1bf8b1.tar.bz2 spack-adbd393c390dd78dca6cdb986ae72835dc1bf8b1.tar.xz spack-adbd393c390dd78dca6cdb986ae72835dc1bf8b1.zip |
Remove special characters (@, %, +, ~, etc) from stage name
-rw-r--r-- | lib/spack/spack/package.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 3507807373..61606d0590 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -438,9 +438,16 @@ class Package(object): raise ValueError("Can only get a stage for a concrete package.") if self._stage is None: + # Construct a mirror path (TODO: get this out of package.py) mp = spack.mirror.mirror_archive_path(self.spec) - self._stage = Stage( - self.fetcher, mirror_path=mp, name=self.spec.short_spec) + + # Construct a path where the stage should build.. + s = self.spec + stage_name = "%s-%s-%s" % (s.name, s.version, s.dag_hash()) + + # Build the stage + self._stage = Stage(self.fetcher, mirror_path=mp, name=stage_name) + return self._stage |