summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2014-12-25 17:55:19 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2014-12-25 17:55:19 -0800
commit0bc861db6e8edf470c91be81e60546b0619216de (patch)
treead9995a801eabc4bca8afddc59b16ff201a64519 /lib
parentd98e475361acdadb3b734fd2dbf97ec603f9b7e8 (diff)
downloadspack-0bc861db6e8edf470c91be81e60546b0619216de.tar.gz
spack-0bc861db6e8edf470c91be81e60546b0619216de.tar.bz2
spack-0bc861db6e8edf470c91be81e60546b0619216de.tar.xz
spack-0bc861db6e8edf470c91be81e60546b0619216de.zip
Fix up bzip2 install
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/llnl/util/filesystem.py8
-rw-r--r--lib/spack/spack/build_environment.py1
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/spack/llnl/util/filesystem.py b/lib/spack/llnl/util/filesystem.py
index 24c77a80db..9f08832598 100644
--- a/lib/spack/llnl/util/filesystem.py
+++ b/lib/spack/llnl/util/filesystem.py
@@ -30,6 +30,7 @@ import os
import sys
import re
import shutil
+import stat
import errno
import getpass
from contextlib import contextmanager, closing
@@ -145,6 +146,13 @@ def install(src, dest):
shutil.copy(src, dest)
set_install_permissions(dest)
+ src_mode = os.stat(src).st_mode
+ dest_mode = os.stat(dest).st_mode
+ if src_mode | stat.S_IXUSR: dest_mode |= stat.S_IXUSR
+ if src_mode | stat.S_IXGRP: dest_mode |= stat.S_IXGRP
+ if src_mode | stat.S_IXOTH: dest_mode |= stat.S_IXOTH
+ os.chmod(dest, dest_mode)
+
def expand_user(path):
"""Find instances of '%u' in a path and replace with the current user's
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py
index 87cfa772ca..45353ec640 100644
--- a/lib/spack/spack/build_environment.py
+++ b/lib/spack/spack/build_environment.py
@@ -190,6 +190,7 @@ def set_module_variables_for_package(pkg):
m.makedirs = os.makedirs
m.remove = os.remove
m.removedirs = os.removedirs
+ m.symlink = os.symlink
m.mkdirp = mkdirp
m.install = install