mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-23 14:41:31 +02:00
bootstrap_sdk: Allow running hooks to modify stage1 repos
Sometimes the modification to stage1 repos is necessary. For example we will need to update baselayout package in stage1, so we get the cleaned up handling of PATH and ROOTPATH, which will allow a newer portage to succeed in calculating dependencies in stage2.
This commit is contained in:
parent
295f6f419b
commit
74a5e5fcc5
@ -158,6 +158,20 @@ stage_repo() {
|
||||
&& git fetch --all \
|
||||
&& git checkout "$gitref" )
|
||||
fi
|
||||
(
|
||||
set -euo pipefail
|
||||
local repo_var hook name
|
||||
|
||||
# FLAGS_coreos_overlay for gitname coreos-overlay
|
||||
repo_var="FLAGS_${gitname//-/_}"
|
||||
shopt -s nullglob
|
||||
for hook in "${FLAGS_coreos_overlay}/coreos/stage1_hooks/"*"-${gitname}.sh"; do
|
||||
name=${hook##*/}
|
||||
name=${name%"-${gitname}.sh"}
|
||||
info "Invoking stage1 ${gitname} hook ${name} on ${dest}/${repo}"
|
||||
"${hook}" "${dest}/${repo}" "${!repo_var}"
|
||||
done
|
||||
)
|
||||
}
|
||||
|
||||
build_stage1() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user