@@ -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
|
||||
|
||||
# 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"
|
||||
|
||||
Reference in New Issue
Block a user