Skip to content

📝 Add docstrings to main #8028

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion lib/functions/host/prepare-host.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,29 @@ function late_prepare_host_dependencies() {
early_prepare_host_dependencies
}

# Adaptive: used by both early & late.
# Prepares and sets the list of host dependencies for the current build.
#
# This function populates a global array (host_dependencies) with a comprehensive list of required
# packages based on the detected host release, target architecture, and other environment settings.
# It conditionally includes packages for Python support, cross-compilers for various architectures,
# and optional tools such as apt-cacher-ng or LLVM tools if specified. Extension hooks are invoked
# to allow further customization of the dependency list.
#
# Globals:
# host_release - Indicates the host OS release; used to determine applicable packages.
# target_arch - Specifies the target architecture; defaults to "all" if not provided.
# host_dependencies - Global array that is populated with the required packages.
# MANAGE_ACNG - If set to "yes", adds the apt-cacher-ng package.
# KERNEL_COMPILER - If set to "clang", adds clang, llvm, and lld packages.
# EXTRA_BUILD_DEPS - Global variable for extra dependencies added via an extension hook.
# FINAL_HOST_DEPS - Global variable set to the finalized, space-separated list of host dependencies.
#
# Outputs:
# Displays debug messages using display_alert to indicate the detection and usage of host_release and target_arch.
#
# Example:
# To prepare host dependencies adaptively:
# adaptative_prepare_host_dependencies
function adaptative_prepare_host_dependencies() {
if [[ "x${host_release:-"unknown"}x" == "xx" ]]; then
display_alert "No specified host_release" "preparing for all-hosts, all-targets deps" "debug"
Expand Down Expand Up @@ -197,6 +219,7 @@ function adaptative_prepare_host_dependencies() {
patchutils pkg-config pv
"qemu-user-static" "arch-test"
rsync
squid-deb-proxy-client
swig # swig is needed for some u-boot's. example: "bananapi.conf"
u-boot-tools
udev # causes initramfs rebuild, but is usually pre-installed.
Expand Down