From 3f3bba05f303fbb6ec49198c92569a2b2e9d2924 Mon Sep 17 00:00:00 2001 From: alvinlollo Date: Thu, 8 Oct 2026 18:53:51 +1100 Subject: [PATCH] fix(test): Fix formatting --- .gitea/workflows/tests.yaml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/tests.yaml b/.gitea/workflows/tests.yaml index c0c8a4e..43087f5 100644 --- a/.gitea/workflows/tests.yaml +++ b/.gitea/workflows/tests.yaml @@ -302,23 +302,33 @@ jobs: echo "" echo "✅ All packages verified successfully!" fi - - name: Check for conflicting packages run: | echo "═══════════════════════════════════════════════════════════════" echo " Checking for conflicting packages in packages.x86_64" echo "═══════════════════════════════════════════════════════════════" - # Collect all package names from the list + # Sync databases first so pacman knows what exists + sudo pacman -Sy --noconfirm + + # Collect only packages that exist in the official repositories PKGS=() while IFS= read -r pkg; do [[ -z "$pkg" || "$pkg" =~ ^# ]] && continue - PKGS+=("$pkg") + + # Check if the package exists in official repos + if pacman -Si "$pkg" >/dev/null 2>&1; then + PKGS+=("$pkg") + else + echo "⚠️ Skipping AUR/missing package: $pkg" + fi done < packages.x86_64 - # Run pacman directly with the array to catch conflict errors - if CONFLICTS=$(pacman -Sp --needed "${PKGS[@]}" 2>&1); then - echo "✅ No package conflicts detected" + # Run conflict check only if we have official packages to test + if [ ${#PKGS[@]} -eq 0 ]; then + echo "✅ No official packages to check." + elif CONFLICTS=$(pacman -Sp --needed "${PKGS[@]}" 2>&1); then + echo "✅ No package conflicts detected among official packages" else echo "------- Pacman Output -------" echo "$CONFLICTS"