summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Gartung <gartung@fnal.gov>2019-06-24 21:09:24 -0500
committerGitHub <noreply@github.com>2019-06-24 21:09:24 -0500
commit30ce818fc44834d822887e812e34cbb02e5af2d0 (patch)
treeeeccdc5d86a5d0eb6bdc2ebd8f876c3cb4f7e6c6
parentfa563f0f55bb0c41616502edd3bdbc6fbf16895c (diff)
downloadspack-30ce818fc44834d822887e812e34cbb02e5af2d0.tar.gz
spack-30ce818fc44834d822887e812e34cbb02e5af2d0.tar.bz2
spack-30ce818fc44834d822887e812e34cbb02e5af2d0.tar.xz
spack-30ce818fc44834d822887e812e34cbb02e5af2d0.zip
Fix for #10063 : install from source if buildcache with different DAG exist (#11834)
* Fix for #10063 : install from source if buildcache with different DAG exist * Flake8
-rw-r--r--lib/spack/spack/package.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py
index 3ae46792b5..b4e3537e92 100644
--- a/lib/spack/spack/package.py
+++ b/lib/spack/spack/package.py
@@ -1358,8 +1358,13 @@ class PackageBase(with_metaclass(PackageMeta, PackageViewMixin, object)):
binary_spec._mark_concrete()
if binary_spec not in specs:
return False
- tty.msg('Installing %s from binary cache' % self.name)
tarball = binary_distribution.download_tarball(binary_spec)
+ # see #10063 : install from source if tarball doesn't exist
+ if tarball is None:
+ tty.msg('%s exist in binary cache but with different hash' %
+ self.name)
+ return False
+ tty.msg('Installing %s from binary cache' % self.name)
binary_distribution.extract_tarball(
binary_spec, tarball, allow_root=False,
unsigned=False, force=False)