Skip to content

Commit 6e9d75a

Browse files
committed
extensions: skip git fetches during config-dump-json
The image-output-arduino and gateway-dk-ask extensions call fetch_from_repo from post_family_config__* hooks. Those hooks run during config-dump-json, where $HOME is unset, so the underlying git_ensure_safe_directory call fails with: fatal: $HOME not set git config --global --add safe.directory /armbian/cache/sources/qcombin This made config-dump-json error out for arduino-uno-q and gateway-dk. Guard the affected hooks with CONFIG_DEFS_ONLY (the same pattern used in extensions/ufs.sh) so they no-op during config dumps.
1 parent 708bb1f commit 6e9d75a

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

extensions/gateway-dk-ask.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ function post_family_config__000_ask_override_family() {
5151
# Fetch ASK repo (sets ASK_CACHE_DIR for all later build phases)
5252
# Uses post_family_config because the kernel patch staging hook needs it before fetch_sources_tools runs
5353
function post_family_config__ask_fetch_repo() {
54+
# Skip during config-dump-json: no $HOME is set, fetch_from_repo would fail in git_ensure_safe_directory
55+
[[ "${CONFIG_DEFS_ONLY}" == "yes" ]] && { declare -g ASK_CACHE_DIR="${SRC}/cache/sources/ask-repo"; return 0; }
5456
# For local file:// repos in Docker, safe.directory is needed (container runs as root)
5557
# Use env vars instead of git config --global to avoid persistent side effects
5658
if [[ "${ASK_REPO}" == file://* ]]; then
@@ -81,6 +83,7 @@ function extension_finish_config__ask_enable_headers() {
8183
# framework merges them with patches from patch/kernel/ at build time. The directory is
8284
# gitignored and ephemeral; it does not persist across clean builds.
8385
function post_family_config__ask_kernel_patch() {
86+
[[ "${CONFIG_DEFS_ONLY}" == "yes" ]] && return 0 # cache wasn't populated during config-dump-json
8487
local patch_src="${ASK_CACHE_DIR}/patches/kernel/002-mono-gateway-ask-kernel_linux_6_12.patch"
8588
[[ -f "${patch_src}" ]] || exit_with_error "ASK kernel patch not found" "${patch_src}"
8689
local patch_dst="${SRC}/userpatches/kernel/${KERNELPATCHDIR}"

extensions/image-output-arduino.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# Fetch Qualcomm flash binaries early in the build
44
function post_family_config__fetch_qcombin() {
5+
[[ "${CONFIG_DEFS_ONLY}" == "yes" ]] && return 0 # skip fetch during config-dump-json (no $HOME, no network needed)
56
display_alert "Fetching qcombin" "${BOARD}" "info"
67
fetch_from_repo "https://github.com/armbian/qcombin" "qcombin" "branch:main"
78
}

0 commit comments

Comments
 (0)