diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2014-01-26 02:15:31 -0800 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2014-02-05 00:17:34 -0800 |
commit | 6d956f372fe01331ec38834e39a248fe258c9a23 (patch) | |
tree | a9fb97cd00a5b0313fcd624e944b245f341382bf | |
parent | 03a32f0d5b89ccda57cf8a63f1ef46a72e79898c (diff) | |
download | spack-6d956f372fe01331ec38834e39a248fe258c9a23.tar.gz spack-6d956f372fe01331ec38834e39a248fe258c9a23.tar.bz2 spack-6d956f372fe01331ec38834e39a248fe258c9a23.tar.xz spack-6d956f372fe01331ec38834e39a248fe258c9a23.zip |
Fix bug in staging.
- Stage needs to account for symlinks in self.tmp_dir
- Use os.realpath on self.tmp_dir when checking to see if a stage needs to be rebuilt
-rw-r--r-- | lib/spack/spack/stage.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index b4f9c21184..a4a5b93929 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -110,11 +110,12 @@ class Stage(object): # Path looks ok, but need to check the target of the link. if os.path.islink(self.path): real_path = os.path.realpath(self.path) + real_tmp = os.path.realpath(self.tmp_root) if spack.use_tmp_stage: # If we're using a tmp dir, it's a link, and it points at the right spot, # then keep it. - if (os.path.commonprefix((real_path, self.tmp_root)) == self.tmp_root + if (os.path.commonprefix((real_path, real_tmp)) == real_tmp and os.path.exists(real_path)): return False else: @@ -266,7 +267,6 @@ class Stage(object): downloaded. """ self.chdir() - if not self.archive_file: tty.die("Attempt to expand archive before fetching.") |