Recognize localrepo and build-end4-deps.sh in package check
Tests / tests (push) Successful in 2m43s

This commit is contained in:
2026-09-15 09:13:44 +10:00
parent 75918f9dfd
commit a0d2dbf009
2 changed files with 18 additions and 20 deletions
+18 -2
View File
@@ -190,6 +190,8 @@ jobs:
echo "═══════════════════════════════════════════════════════════════"
echo " Checking packages.x86_64 against repos"
echo " Allowed repos: cachyos, extra, multilib, chaotic-aur"
echo " Also accepted: localrepo/ pre-built packages"
echo " Also accepted: packages listed in build-end4-deps.sh"
echo "═══════════════════════════════════════════════════════════════"
ALLOWED_REPOS="^(core|extra|multilib|cachyos|chaotic-aur)$"
@@ -202,9 +204,8 @@ jobs:
[[ -z "$pkg" || "$pkg" =~ ^# ]] && continue
TOTAL=$((TOTAL + 1))
# Query pacman for the package's repository (all matches, strip \r)
# 1) Check allowed repos via pacman
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
@@ -213,6 +214,21 @@ jobs:
break
fi
done
# 2) Check localrepo/ for a pre-built .pkg.tar.zst
if [[ $MATCHED -eq 0 ]] && compgen -G "localrepo/${pkg}-*.pkg.tar.zst" > /dev/null 2>&1; then
MATCHED=1
FOUND=$((FOUND + 1))
echo "📦 LOCAL: $pkg (pre-built in localrepo/)"
fi
# 3) Check build-end4-deps.sh for the package name
if [[ $MATCHED -eq 0 ]] && grep -qxF "${pkg}" localrepo/build-end4-deps.sh 2>/dev/null; then
MATCHED=1
FOUND=$((FOUND + 1))
echo "📦 BUILD: $pkg (listed in build-end4-deps.sh)"
fi
if [[ $MATCHED -eq 0 ]]; then
if [[ -z "$repos" ]]; then
echo "❌ MISSING: $pkg"