-
Notifications
You must be signed in to change notification settings - Fork 50
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 pre-install hook that raises an error in case keeppreviousinstall
(used for rebuilds) is set but the installation directory still contains files
#881
base: 2023.06-software.eessi.io
Are you sure you want to change the base?
Conversation
Instance
|
Instance
|
bot: build repo:eessi.io-2023.06-software arch:x86_64/amd/zen2 |
Updates by the bot instance
|
Updates by the bot instance
|
New job on instance
|
@@ -450,6 +450,16 @@ def pre_fetch_hook_zen4_gcccore1220(self, *args, **kwargs): | |||
print_msg("Updated build option 'force' to 'True'") | |||
|
|||
|
|||
def pre_install_hook(self, *args, **kwargs): | |||
"""Main pre install hook: trigger custom functions based on software name.""" | |||
if 'keeppreviousinstall' in self.cfg and self.cfg['keeppreviousinstall']: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done: cc79fd7
This is an enhancement for #871 and implements the comment from @boegel in #871 (comment).
I've tested it locally with
EESSI-extend
for the following scenarios:keeppreviousinstall
-> this always works, as expected--try-amend=keeppreviousinstall=True
:You can test it by loading
EESSI-extend
, overridingEASYBUILD_HOOKS
and setting it to the hooks file of this PR, and doing a small build with or without--try-amend=keeppreviousinstall=True
.