summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDenis Davydov <davydden@gmail.com>2016-12-26 04:24:56 +0100
committerTodd Gamblin <tgamblin@llnl.gov>2016-12-25 19:24:56 -0800
commit91bfebbed8673b95c425a174a1fa16d9e8fa0fde (patch)
tree21b367206fd9c1686ec9e7f443e2c45477bb460e /lib
parente16908b16bf8b9644ca177d9d5061c312bb580aa (diff)
downloadspack-91bfebbed8673b95c425a174a1fa16d9e8fa0fde.tar.gz
spack-91bfebbed8673b95c425a174a1fa16d9e8fa0fde.tar.bz2
spack-91bfebbed8673b95c425a174a1fa16d9e8fa0fde.tar.xz
spack-91bfebbed8673b95c425a174a1fa16d9e8fa0fde.zip
filter_system_path: additionally filter system prefixes (#2672)
That's because in set_build_environment_variables() the funciton filter_system_paths() is actually applied to package prefixes, and not to prefix/lib or prefix/include.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/test/environment.py3
-rw-r--r--lib/spack/spack/util/environment.py5
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/spack/spack/test/environment.py b/lib/spack/spack/test/environment.py
index 2b499869c5..e9f0a5182f 100644
--- a/lib/spack/spack/test/environment.py
+++ b/lib/spack/spack/test/environment.py
@@ -64,11 +64,14 @@ class EnvironmentTest(unittest.TestCase):
filtered = filter_system_paths([
'/usr/local/Cellar/gcc/5.3.0/lib',
'/usr/local/lib',
+ '/usr/local',
'/usr/local/include',
'/usr/local/lib64',
'/usr/local/opt/some-package/lib',
'/usr/opt/lib',
'/lib',
+ '/',
+ '/usr',
'/lib64',
'/include',
'/opt/some-package/include',
diff --git a/lib/spack/spack/util/environment.py b/lib/spack/spack/util/environment.py
index 15eb52d8e2..420cce8245 100644
--- a/lib/spack/spack/util/environment.py
+++ b/lib/spack/spack/util/environment.py
@@ -24,9 +24,10 @@
##############################################################################
import os
-system_paths = ['/', '/usr/', '/usr/local']
+system_paths = ['/', '/usr', '/usr/local']
suffixes = ['lib', 'lib64', 'include']
-system_dirs = [os.path.join(p, s) for s in suffixes for p in system_paths]
+system_dirs = [os.path.join(p, s) for s in suffixes for p in system_paths] + \
+ system_paths
system_bins = [os.path.join(p, 'bin') for p in system_paths]