summaryrefslogtreecommitdiff
path: root/lib/spack/llnl
diff options
context:
space:
mode:
authorGreg Becker <becker33@llnl.gov>2020-10-15 17:23:16 -0700
committerGitHub <noreply@github.com>2020-10-15 17:23:16 -0700
commit7a6268593ce957a54bbe8fbcb7b3e1ea1b71ee2c (patch)
tree2c0a02fbce875022ad4af6eca844646be0a99dea /lib/spack/llnl
parent2ed39dfd8eeaf34757cabe1bb761ffc9057ca35f (diff)
downloadspack-7a6268593ce957a54bbe8fbcb7b3e1ea1b71ee2c.tar.gz
spack-7a6268593ce957a54bbe8fbcb7b3e1ea1b71ee2c.tar.bz2
spack-7a6268593ce957a54bbe8fbcb7b3e1ea1b71ee2c.tar.xz
spack-7a6268593ce957a54bbe8fbcb7b3e1ea1b71ee2c.zip
Environments: specify packages for developer builds (#15256)
* allow environments to specify dev-build packages * spack develop and spack undevelop commands * never pull dev-build packges from bincache * reinstall dev_specs when code has changed; reinstall dependents too * preserve dev info paths and versions in concretization as special variant * move install overwrite transaction into installer * move dev-build argument handling to package.do_install now that specs are dev-aware, package.do_install can add necessary args (keep_stage=True, use_cache=False) to dev builds. This simplifies driving logic in cmd and env._install * allow 'any' as wildcard for variants * spec: allow anonymous dependencies raise an error when constraining by or normalizing an anonymous dep refactor concretize_develop to remove dev_build variant refactor tests to check for ^dev_path=any instead of +dev_build * fix variant class hierarchy
Diffstat (limited to 'lib/spack/llnl')
-rw-r--r--lib/spack/llnl/util/filesystem.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/spack/llnl/util/filesystem.py b/lib/spack/llnl/util/filesystem.py
index 1bc177a68b..b8d0b4d2f1 100644
--- a/lib/spack/llnl/util/filesystem.py
+++ b/lib/spack/llnl/util/filesystem.py
@@ -47,6 +47,7 @@ __all__ = [
'install_tree',
'is_exe',
'join_path',
+ 'last_modification_time_recursive',
'mkdirp',
'partition_path',
'prefixes',
@@ -920,6 +921,15 @@ def set_executable(path):
os.chmod(path, mode)
+def last_modification_time_recursive(path):
+ path = os.path.abspath(path)
+ times = [os.stat(path).st_mtime]
+ times.extend(os.stat(os.path.join(root, name)).st_mtime
+ for root, dirs, files in os.walk(path)
+ for name in dirs + files)
+ return max(times)
+
+
def remove_empty_directories(root):
"""Ascend up from the leaves accessible from `root` and remove empty
directories.