Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to skip pre-creation of install directory #2629

Merged
merged 3 commits into from Oct 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 8 additions & 3 deletions easybuild/framework/easyblock.py
Expand Up @@ -36,6 +36,7 @@
:author: Fotis Georgatos (Uni.Lu, NTUA)
:author: Damian Alvarez (Forschungszentrum Juelich GmbH)
:author: Maxime Boissonneault (Compute Canada)
:author: Davide Vanzo (Vanderbilt University)
"""

import copy
Expand Down Expand Up @@ -1673,9 +1674,13 @@ def fetch_step(self, skip_checksums=False):
for mod_symlink_path in mod_symlink_paths:
pardirs.append(os.path.join(install_path('mod'), mod_symlink_path, mod_subdir))

self.log.info("Checking dirs that need to be created: %s" % pardirs)
for pardir in pardirs:
mkdir(pardir, parents=True)
# skip directory creation if pre-create-installdir is set to False
if build_option('pre_create_installdir'):
self.log.info("Checking dirs that need to be created: %s" % pardirs)
for pardir in pardirs:
mkdir(pardir, parents=True)
else:
self.log.info("Skipped installation dirs check per user request")

def checksum_step(self):
"""Verify checksum of sources and patches, if a checksum is available."""
Expand Down
1 change: 1 addition & 0 deletions easybuild/tools/config.py
Expand Up @@ -218,6 +218,7 @@ def mk_full_default_path(name, prefix=DEFAULT_PREFIX):
'extended_dry_run_ignore_errors',
'mpi_tests',
'modules_tool_version_check',
'pre_create_installdir',
],
WARN: [
'check_ebroot_env_vars',
Expand Down
2 changes: 2 additions & 0 deletions easybuild/tools/options.py
Expand Up @@ -400,6 +400,8 @@ def override_options(self):
'output-format': ("Set output format", 'choice', 'store', FORMAT_TXT, [FORMAT_TXT, FORMAT_RST]),
'parallel': ("Specify (maximum) level of parallellism used during build procedure",
'int', 'store', None),
'pre-create-installdir': ("Create installation directory before submitting build jobs",
None, 'store_true', True),
'pretend': (("Does the build/installation in a test directory located in $HOME/easybuildinstall"),
None, 'store_true', False, 'p'),
'read-only-installdir': ("Set read-only permissions on installation directory after installation",
Expand Down