From 458838c1d00350b3951ee1b907ce129b847e495e Mon Sep 17 00:00:00 2001 From: tabrisnet <96966042+tabrisnet@users.noreply.github.com> Date: Sun, 16 Nov 2025 16:01:13 -0500 Subject: [PATCH] Document the process of skipping/ignoring/opting-out of an individual hook function (#842) related to armbian/build#8897 Any function making use of the extension framework [generally of the form hook_name__individual_function] can be skipped in a board or family config --- docs/Developer-Guide_Extensions-Hooks.md | 1 + docs/Developer-Guide_Extensions.md | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/docs/Developer-Guide_Extensions-Hooks.md b/docs/Developer-Guide_Extensions-Hooks.md index 950edbb0..4dc9e42a 100644 --- a/docs/Developer-Guide_Extensions-Hooks.md +++ b/docs/Developer-Guide_Extensions-Hooks.md @@ -5,6 +5,7 @@ ## Hooks - Hooks are listed in the order they are called. +- Individual/specific hook functions can be [skipped/ignored/opted-out](/Developer-Guide_Extensions#opt-out-of-individual-hook-functions). ### `post_family_config` diff --git a/docs/Developer-Guide_Extensions.md b/docs/Developer-Guide_Extensions.md index 76db028d..58812f00 100644 --- a/docs/Developer-Guide_Extensions.md +++ b/docs/Developer-Guide_Extensions.md @@ -97,3 +97,13 @@ They're the same, except: - Directory-based extensions will be passed a `${EXTENSION_DIR}` environment variable. - That is useful if there are other files/assets that belong together with that extension. An example would be a template file, some configuration file, or other static asset that is directly related to the extension. - Using directory-based extensions and `${EXTENSION_DIR}` allows for easy moving and PR'ing of user extensions. + +# Opt-out of individual hook functions + +Any function making use of the extension framework [generally of the form `hook_name__individual_function`] can be skipped in a board or family config, by way of + +```bash +unset -f hook_name__individual_function +``` + +Doing so is at the board/family maintainer's own risk and doing so is officially unsupported. Consider splitting the function into pieces so that only the part the board/family cannot tolerate is skipped.