mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-28 14:01:43 +01:00
build_dev_binpkgs: Only build packages available to the board profile
Updating only the SDK to systemd-257 caused this script to break, as it saw this version being pulled in as a BDEPEND and then tried to build it using the board profile. See the comment for details. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
This commit is contained in:
parent
78167629ba
commit
6237a60988
@ -55,6 +55,12 @@ pkg_skipped_list=()
|
|||||||
|
|
||||||
info "Collecting list of binpkgs to build"
|
info "Collecting list of binpkgs to build"
|
||||||
|
|
||||||
|
# Normally, BDEPENDs are only installed to the SDK, but the point of this script
|
||||||
|
# is to install them to the board root because the dev container uses a board
|
||||||
|
# profile. This is easily achieved using --root-deps. Since it is still the SDK
|
||||||
|
# doing the building, which might have different package versions available to
|
||||||
|
# the board profile, we have to be careful not to include SDK BDEPENDs in the
|
||||||
|
# list of binary packages to publish, hence the sed call.
|
||||||
while read -r pkg; do
|
while read -r pkg; do
|
||||||
[[ -f /build/${FLAGS_board}/var/lib/portage/pkgs/${pkg}.tbz2 ]] && continue
|
[[ -f /build/${FLAGS_board}/var/lib/portage/pkgs/${pkg}.tbz2 ]] && continue
|
||||||
IFS=,
|
IFS=,
|
||||||
@ -67,8 +73,8 @@ while read -r pkg; do
|
|||||||
unset IFS
|
unset IFS
|
||||||
pkg_build_list+=("=${pkg}")
|
pkg_build_list+=("=${pkg}")
|
||||||
echo " =${pkg}"
|
echo " =${pkg}"
|
||||||
done < <(my_board_emerge --pretend --emptytree "${@}" |
|
done < <(my_board_emerge --pretend --emptytree --root-deps "${@}" |
|
||||||
grep '\[ebuild' | sed 's/^\[[^]]\+\] \([^ :]\+\)*:.*/\1/')
|
sed -n "/\[ebuild .* to \/build\/${FLAGS_board}\/ /s/^\[[^]]\+\] \([^ :]\+\)*:.*/\1/p")
|
||||||
# --
|
# --
|
||||||
|
|
||||||
if [[ ${#pkg_skipped_list[@]} -gt 0 ]]; then
|
if [[ ${#pkg_skipped_list[@]} -gt 0 ]]; then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user