-
Notifications
You must be signed in to change notification settings - Fork 283
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
PackedBinary doesn't execute install_cmd when only files (no folders) are extracted from tar #1334
Comments
I have just come across this error and I can't believe it's still open after 3 years.. really frustrating! |
@boegel Think I need a bit of advice here. If I understand the relevant easyblocks correctly, I should be able to switch over the use of https://github.com/easybuilders/easybuild-easyblocks/blob/develop/easybuild/easyblocks/generic/binary.py#L110-L111 to |
Hmm, I think I will do the easy thing because that is not quite right, I need to provide the specific path to the source.
I'll open a PR and we can discuss the merits |
@cmfield Can you try |
PackedBinary contains some logic separating two cases: whether only files are extracted from a tar, or whether folders are extracted.
if os.path.isdir(srcpath): # copy files to install dir via Binary self.cfg['start_dir'] = src Binary.install_step(self) elif os.path.isfile(srcpath): shutil.copy2(srcpath, self.installdir)
When folders are extracted (i.e. the 'if' is true), Binary.install_step is called, which executes install_cmd. However, when only files are extracted (the 'elif' scenario), it only copies the files, and the install_cmd is not executed.
For this scenario, PackedBinary should either execute the install_cmd, or return an error (or at least a warning in the log) that the install_cmd is being ignored.
The text was updated successfully, but these errors were encountered: