diff --git a/.gitea/workflows/tests.yaml b/.gitea/workflows/tests.yaml index f8d6d6d..098e4ed 100644 --- a/.gitea/workflows/tests.yaml +++ b/.gitea/workflows/tests.yaml @@ -202,16 +202,23 @@ jobs: [[ -z "$pkg" || "$pkg" =~ ^# ]] && continue TOTAL=$((TOTAL + 1)) - # Query pacman for the package's repository (strip \r just in case) - repo=$(pacman -Si "$pkg" 2>/dev/null | grep "^Repository" | awk '{print $3}' | tr -d '\r') - - if [[ -z "$repo" ]]; then - echo "❌ MISSING: $pkg" - MISSING+=("$pkg") - elif [[ "$repo" =~ $ALLOWED_REPOS ]]; then - FOUND=$((FOUND + 1)) - else - echo "⚠️ WRONG REPO: $pkg (found in: $repo)" + # Query pacman for the package's repository (all matches, strip \r) + repos=$(pacman -Si "$pkg" 2>/dev/null | grep "^Repository" | awk '{print $3}' | tr -d '\r') + # Check if ANY of the repos is in the allowed list + MATCHED=0 + for repo in $repos; do + if [[ "$repo" =~ $ALLOWED_REPOS ]]; then + MATCHED=1 + FOUND=$((FOUND + 1)) + break + fi + done + if [[ $MATCHED -eq 0 ]]; then + if [[ -z "$repos" ]]; then + echo "❌ MISSING: $pkg" + else + echo "⚠️ WRONG REPO: $pkg (found in: $repos)" + fi MISSING+=("$pkg") fi done < packages.x86_64