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

make Binary and MakeCp easyblocks aware of 'keepsymlinks' #959

Merged
merged 1 commit into from Jun 15, 2016
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
2 changes: 1 addition & 1 deletion easybuild/easyblocks/generic/binary.py
Expand Up @@ -100,7 +100,7 @@ def install_step(self):
try:
# shutil.copytree doesn't allow the target directory to exist already
rmtree2(self.installdir)
shutil.copytree(self.cfg['start_dir'], self.installdir)
shutil.copytree(self.cfg['start_dir'], self.installdir, symlinks=self.cfg['keepsymlinks'])
except OSError, err:
raise EasyBuildError("Failed to copy %s to %s: %s", self.cfg['start_dir'], self.installdir, err)
else:
Expand Down
3 changes: 2 additions & 1 deletion easybuild/easyblocks/generic/makecp.py
Expand Up @@ -127,7 +127,8 @@ def install_step(self):
# copy directory
elif os.path.isdir(filepath):
self.log.debug("Copying directory %s to %s" % (filepath, target))
shutil.copytree(filepath, os.path.join(target, os.path.basename(filepath)))
fulltarget = os.path.join(target, os.path.basename(filepath))
shutil.copytree(filepath, fulltarget, symlinks=self.cfg['keepsymlinks'])
else:
raise EasyBuildError("Can't copy non-existing path %s to %s", filepath, target)

Expand Down