Skip to content

Commit

Permalink
Merge pull request #2629 from vanzod/skip_mk_instdir
Browse files Browse the repository at this point in the history
Add option to skip pre-creation of install directory
  • Loading branch information
boegel committed Oct 19, 2018
2 parents 4ada6ed + eb98389 commit 0bd27d0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
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

0 comments on commit 0bd27d0

Please sign in to comment.