From 3dad5765ca61c293aeebcb79dc4830a1942c4455 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 30 Apr 2026 19:36:55 +0000 Subject: [PATCH] Install target packages after repo update --- contrib/agrarian-build-menu.sh | 15 ++++++++++++++- doc/build-menu.md | 4 ++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/contrib/agrarian-build-menu.sh b/contrib/agrarian-build-menu.sh index f7bb6e46..963d0530 100755 --- a/contrib/agrarian-build-menu.sh +++ b/contrib/agrarian-build-menu.sh @@ -244,6 +244,18 @@ EOF fi } +install_bootstrap_packages() { + has_cmd apt-get || return 0 + has_cmd git && return 0 + + export DEBIAN_FRONTEND=noninteractive + if ubuntu_sources_need_repair; then + repair_ubuntu_sources + fi + sudo_cmd apt-get update + sudo_cmd apt-get install -y ca-certificates git +} + ensure_repo() { WORKDIR="$(prompt "Repository directory" "$WORKDIR")" JOBS="$(prompt "Parallel build jobs" "$JOBS")" @@ -437,8 +449,9 @@ show_completion() { main() { select_target progress 5 "Selected target: $MENU_CHOICE" - run_step 15 "Installing required Ubuntu packages" install_packages + run_step 10 "Installing bootstrap Ubuntu packages" install_bootstrap_packages ensure_repo + run_step 40 "Installing required Ubuntu packages" install_packages build_selected show_completion } diff --git a/doc/build-menu.md b/doc/build-menu.md index 93604ec6..f4ef6551 100644 --- a/doc/build-menu.md +++ b/doc/build-menu.md @@ -13,6 +13,10 @@ The script clones the Agrarian repository if the selected checkout directory does not exist. If the checkout already exists, it fetches, checks out the configured branch, and performs a fast-forward pull. +Only bootstrap packages needed to update the checkout are installed before the +pull. Target-specific packages are installed after the checkout is current, so +fresh dependency fixes on the selected branch are applied before the build. + Quick Start -----------