From 2ad6cd90bbad29b15396b554c39cce6af7046cac Mon Sep 17 00:00:00 2001 From: Ryan Hughes Date: Mon, 25 Aug 2025 05:53:28 +0200 Subject: [PATCH] Parse actual repo name --- build/Dockerfile | 2 +- build/build-aur.sh | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index 4191450..c4ef4c4 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -2,7 +2,7 @@ FROM archlinux:latest # Update system and install build tools RUN pacman -Syu --noconfirm && \ - pacman -S --noconfirm base-devel git sudo wget + pacman -S --noconfirm base-devel git sudo wget jq # Create build user RUN useradd -m -G wheel builder && \ diff --git a/build/build-aur.sh b/build/build-aur.sh index e4cbf9e..8b435c6 100644 --- a/build/build-aur.sh +++ b/build/build-aur.sh @@ -45,7 +45,17 @@ build_aur_package() { # Case 3: Directory doesn't exist - clone else - git clone "https://aur.archlinux.org/${pkg}.git" || { + # Get the package base from AUR RPC (some packages have different repo names) + local pkg_base=$(curl -s "https://aur.archlinux.org/rpc/?v=5&type=info&arg[]=$pkg" | jq -r '.results[0].PackageBase // empty') + + # Fall back to package name if API call fails or returns nothing + if [[ -z "$pkg_base" ]]; then + pkg_base="$pkg" + elif [[ "$pkg_base" != "$pkg" ]]; then + echo " Using package base: $pkg_base" + fi + + git clone "https://aur.archlinux.org/${pkg_base}.git" "$pkg" || { echo " Failed to clone $pkg" FAILED_PACKAGES="$FAILED_PACKAGES $pkg" return 1