From 2b0e98774fdc11a1adfa6e5e8192aefe5d16436f Mon Sep 17 00:00:00 2001 From: Simone Date: Sat, 6 Jun 2026 12:55:22 +0200 Subject: [PATCH] feat(template): add GTK4/PyGObject/Xvfb toolchain deps; always apt-update Step 4a installs python3-gi gir1.2-gtk-4.0 xvfb for headless PyGObject GUI tests, with import-gi and Xvfb assertions. Step 1 now always runs apt-get update; --skip-update only skips the (slow) full upgrade. Previously --skip-update skipped the index refresh too, so a fresh package (gir1.2-gtk-4.0/xvfb) could not be located. Co-Authored-By: Claude Opus 4.8 --- template/Install-CIToolchain-Linux2404.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/template/Install-CIToolchain-Linux2404.sh b/template/Install-CIToolchain-Linux2404.sh index 593e568..a7fa58d 100644 --- a/template/Install-CIToolchain-Linux2404.sh +++ b/template/Install-CIToolchain-Linux2404.sh @@ -51,12 +51,15 @@ assert_step() { # --- Step 1: apt update + upgrade --- echo "" echo "=== Step 1: apt update + upgrade ===" +# apt-get update always runs — package index must be fresh to locate packages. +# --skip-update only skips the (slow) full upgrade. +sudo DEBIAN_FRONTEND=noninteractive apt-get update -qq +assert_step "apt update completed" true if [ "${SKIP_UPDATE:-0}" = "0" ]; then - sudo DEBIAN_FRONTEND=noninteractive apt-get update -qq sudo DEBIAN_FRONTEND=noninteractive apt-get upgrade -y -qq - assert_step "apt update + upgrade completed" true + assert_step "apt upgrade completed" true else - echo " [SKIP] --skip-update flag set" + echo " [SKIP] --skip-update flag set — upgrade skipped (index still refreshed)" fi # --- Step 2: build essentials --- @@ -88,6 +91,14 @@ assert_step "git available" command -v git assert_step "7z available" command -v 7z assert_step "curl available" command -v curl +# --- Step 4a: GTK/GObject + headless display (PyGObject GUI tests) --- +echo "" +echo "=== Step 4a: GTK4 / GObject introspection + Xvfb ===" +sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -qq \ + python3-gi gir1.2-gtk-4.0 xvfb +assert_step "python3-gi importable" python3 -c "import gi" +assert_step "xvfb available" command -v Xvfb + # --- Step 4b: .NET SDK (optional) --- echo "" echo "=== Step 4b: .NET SDK (optional) ==="