Skip to content

Commit

Permalink
build_packages: add cmd line option to stop after breaking dep loops
Browse files Browse the repository at this point in the history
This change adds a command line option to build_packages to stop
execution of the script after breaking circular dependencies (i.e.
before board packages are built). Helpful for debugging package build
issues.

Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
  • Loading branch information
t-lo committed Dec 15, 2023
1 parent b26527b commit 29aea36
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions build_packages
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ DEFINE_boolean skip_toolchain_update "${FLAGS_FALSE}" \
"Don't update toolchain automatically."
DEFINE_boolean skip_chroot_upgrade "${FLAGS_FALSE}" \
"Don't run the chroot upgrade automatically; use with care."
DEFINE_boolean only_resolve_circular_deps "${FLAGS_FALSE}" \
"Don't build all packages; only resolve circular dependencies, then stop."

# include upload options
. "${BUILD_LIBRARY_DIR}/release_util.sh" || exit 1
Expand Down Expand Up @@ -275,6 +277,11 @@ if [[ "${FLAGS_usepkgonly}" -eq "${FLAGS_FALSE}" ]]; then
net-libs/nghttp2 systemd
fi

if [[ "${FLAGS_only_resolve_circular_deps}" -eq "${FLAGS_TRUE}" ]]; then
info "Circular dependencies resolved. Stopping as requested."
exit
fi

export KBUILD_BUILD_USER="${BUILD_USER:-build}"
export KBUILD_BUILD_HOST="${BUILD_HOST:-pony-truck.infra.kinvolk.io}"

Expand Down

0 comments on commit 29aea36

Please # to comment.