diff --git a/DECISIONS.md b/DECISIONS.md index ee13cef..06fe645 100644 --- a/DECISIONS.md +++ b/DECISIONS.md @@ -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. diff --git a/scripts/post-install.sh b/scripts/post-install.sh index 44c2871..5cb9264 100755 --- a/scripts/post-install.sh +++ b/scripts/post-install.sh @@ -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 diff --git a/scripts/transform.sh b/scripts/transform.sh index caeb0fc..5232c02 100755 --- a/scripts/transform.sh +++ b/scripts/transform.sh @@ -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..."