fix: move paru repo config into moonarch.install to break bootstrap loop
All checks were successful
Update PKGBUILD version / update-pkgver (push) Successful in 3s

The paru PKGBUILD repo config was only set up by post-install.sh and
transform.sh. If the config was missing on an existing system,
moonarch-git couldn't update — the fix required the package that
delivers the fix.

Now moonarch.install sets up the config on every install/upgrade.
post-install.sh keeps it for first-time bootstrap (before moonarch-git
exists). transform.sh no longer manages it.
This commit is contained in:
nevaforget 2026-04-07 11:11:58 +02:00
parent 29550b8a14
commit 25baf88a2a
3 changed files with 9 additions and 13 deletions

View File

@ -1,5 +1,11 @@
# Decisions
## 2026-04-07 Move paru repo config into moonarch.install hook
- **Who**: Dominik, ClaudeCode
- **Why**: paru PKGBUILD repo config was only set up by post-install.sh and transform.sh. If paru updated and overwrote /etc/paru.conf, or the config was missing on existing systems, moonarch-git couldn't update itself — bootstrap loop where the fix requires the package that delivers the fix.
- **Tradeoffs**: Config setup is now in two places: moonarch.install (for updates) and post-install.sh (for first install before moonarch-git exists). Acceptable duplication to break the circular dependency.
- **How**: Added paru repo config (Mode=arp + [moonarch-pkgbuilds] section) to moonarch.install post_install/post_upgrade hook. Kept post-install.sh setup for bootstrap. Removed redundant setup from transform.sh.
## 2026-04-02 Rename paru PKGBUILD repo, move config to /etc/paru.conf
- **Who**: Dominik, Ragnar
- **Why**: paru PKGBUILD repo and pacman package registry both used `[moonarch]` as section name. When pkgver-bot pushed version bumps, paru tried to resolve PKGBUILD targets (moongreet-git, moonlock-git) against the pacman repo — which only contains moonarch-git — causing "nicht alle benötigten Pakete gefunden" errors.

View File

@ -60,7 +60,7 @@ fi
rm -f "$KEY_FILE"
trap - EXIT
# --- Set up Moonarch custom paru repo ---
# --- Set up Moonarch custom paru repo (needed for first install bootstrap) ---
log "Setting up Moonarch paru repo..."
PARU_CONF="/etc/paru.conf"
@ -80,7 +80,7 @@ fi
paru -Syu --pkgbuilds --noconfirm
# --- Install moonarch-git (pulls in all configs, scripts, themes as dependencies) ---
# --- Install moonarch-git (subsequent updates handled by moonarch.install hook) ---
log "Installing moonarch-git package..."
paru -S --needed --noconfirm moonarch-git

View File

@ -245,17 +245,7 @@ fi
rm -f "$KEY_FILE"
trap - EXIT
# Moonarch custom paru repo
log "Setting up Moonarch paru repo..."
PARU_CONF="/etc/paru.conf"
if ! grep -q '\[moonarch-pkgbuilds\]' "$PARU_CONF" 2>/dev/null; then
printf '\n[moonarch-pkgbuilds]\nUrl = https://gitea.moonarch.de/nevaforget/moonarch-pkgbuilds.git\n' \
| sudo tee -a "$PARU_CONF" > /dev/null
log " + Moonarch repo added to paru.conf."
else
log " ~ Moonarch repo already in paru.conf."
fi
# Install/update moonarch-git (paru repo config is set up by moonarch.install hook)
paru -Syu --pkgbuilds --noconfirm
log "Installing moonarch-git package..."