software-layer
software-layer copied to clipboard
Add pre-install hook that raises an error in case `keeppreviousinstall` (used for rebuilds) is set but the installation directory still contains files
This is an enhancement for #871 and implements the comment from @boegel in https://github.com/EESSI/software-layer/pull/871#issuecomment-2606523933.
I've tested it locally with EESSI-extend for the following scenarios:
- no
keeppreviousinstall-> this always works, as expected - with
--try-amend=keeppreviousinstall=True:- empty install dir -> works
- only some empty subdirs in the install dir -> works
- file in the root of install dir -> error
- file in a subdir -> error
You can test it by loading EESSI-extend, overriding EASYBUILD_HOOKS and setting it to the hooks file of this PR, and doing a small build with or without --try-amend=keeppreviousinstall=True.
Instance eessi-bot-mc-aws is configured to build for:
- architectures:
x86_64/generic,x86_64/intel/haswell,x86_64/intel/sapphire_rapids,x86_64/intel/skylake_avx512,x86_64/amd/zen2,x86_64/amd/zen3,aarch64/generic,aarch64/neoverse_n1,aarch64/neoverse_v1 - repositories:
eessi.io-2023.06-software,eessi.io-2023.06-compat
Instance eessi-bot-mc-azure is configured to build for:
- architectures:
x86_64/amd/zen4 - repositories:
eessi.io-2023.06-software,eessi.io-2023.06-compat
bot: build repo:eessi.io-2023.06-software arch:x86_64/amd/zen2
Updates by the bot instance eessi-bot-mc-aws
(click for details)
-
received bot command
build repo:eessi.io-2023.06-software arch:x86_64/amd/zen2fromboegel- expanded format:
build repository:eessi.io-2023.06-software architecture:x86_64/amd/zen2
- expanded format:
-
handling command
build repository:eessi.io-2023.06-software architecture:x86_64/amd/zen2resulted in:- submitted job
42405, for details & status see https://github.com/EESSI/software-layer/pull/881#issuecomment-2612291182
- submitted job
Updates by the bot instance eessi-bot-mc-azure
(click for details)
-
received bot command
build repo:eessi.io-2023.06-software arch:x86_64/amd/zen2fromboegel- expanded format:
build repository:eessi.io-2023.06-software architecture:x86_64/amd/zen2
- expanded format:
-
handling command
build repository:eessi.io-2023.06-software architecture:x86_64/amd/zen2resulted in:- no jobs were submitted
New job on instance eessi-bot-mc-aws for CPU micro-architecture x86_64-amd-zen2 for repository eessi.io-2023.06-software in job dir /project/def-users/SHARED/jobs/2025.01/pr_881/42405
| date | job status | comment |
|---|---|---|
| Jan 24 11:24:19 UTC 2025 | submitted | job id 42405 awaits release by job manager |
| Jan 24 11:24:53 UTC 2025 | released | job awaits launch by Slurm scheduler |
| Jan 24 11:25:55 UTC 2025 | running | job 42405 is running |
| Jan 24 11:33:02 UTC 2025 | finished | :grin: SUCCESS (click triangle for details)
|
| Jan 24 11:33:02 UTC 2025 | test result | :grin: SUCCESS (click triangle for details)
|
@bedroge can you move these changes to https://github.com/EESSI/software-layer-scripts