From a7b6795a4650e4f3c951ba36846dd6cd6e3b44d2 Mon Sep 17 00:00:00 2001 From: Mitsuba100 Date: Mon, 23 Mar 2026 15:58:07 +0100 Subject: [PATCH] >:| still not working --- .github/workflows/update-repo.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/update-repo.yml b/.github/workflows/update-repo.yml index a74a957..0c7853f 100644 --- a/.github/workflows/update-repo.yml +++ b/.github/workflows/update-repo.yml @@ -27,7 +27,7 @@ jobs: - name: Update Repository Database run: | cd x86_64 - # Remove old DB and sig files for a clean build + # Remove all old DB and sig files to ensure a 100% clean rebuild rm -f hyprarch-repo.db* hyprarch-repo.files* mkdir -p db_temp @@ -37,13 +37,14 @@ jobs: gpg --detach-sign --batch --no-armor --local-user 236328A7F2C2001E "$pkg" # 2. Extract specific metadata (Strict Cleaning) + # This logic avoids grabbing comments like "# Generated by..." pkgname=$(bsdtar -xOf "$pkg" .PKGINFO | grep "^pkgname =" | cut -d' ' -f3) pkgver=$(bsdtar -xOf "$pkg" .PKGINFO | grep "^pkgver =" | cut -d' ' -f3) pkgdesc=$(bsdtar -xOf "$pkg" .PKGINFO | grep "^pkgdesc =" | cut -d' ' -f3- | sed "s/['\"]//g") mkdir -p "db_temp/$pkgname-$pkgver" - # Manually construct the 'desc' file to avoid "unknown key" errors + # Manually construct a clean 'desc' file for Pacman { echo "%NAME%" echo "$pkgname" @@ -69,7 +70,7 @@ jobs: } > "db_temp/$pkgname-$pkgver/desc" done - # 3. Compress the metadata into a real Arch DB + # 3. Pack the database metadata cd db_temp tar -c * | gzip -9 > ../hyprarch-repo.db.tar.gz cd .. @@ -77,10 +78,11 @@ jobs: # 4. Sign the database itself gpg --detach-sign --batch --no-armor --local-user 236328A7F2C2001E hyprarch-repo.db.tar.gz - # 5. Finalize files + # 5. Finalize files (Ensure both .db and .files are clean) cp hyprarch-repo.db.tar.gz hyprarch-repo.db cp hyprarch-repo.db.tar.gz.sig hyprarch-repo.db.sig cp hyprarch-repo.db.tar.gz hyprarch-repo.files + cp hyprarch-repo.db.tar.gz hyprarch-repo.files.tar.gz rm -rf db_temp - name: Generate Subfolder Index @@ -137,7 +139,7 @@ jobs: git config --global user.email "github-actions[bot]@users.noreply.github.com" git add . if ! git diff-index --quiet HEAD; then - git commit -m "Final Fix: Clean Metadata and GPG Signed DB" + git commit -m "Final Infrastructure Fix: Clean DB/Files and GPG Signing" git push else echo "Nothing to change."