diff --git a/lib/packages.sh b/lib/packages.sh index a33bfc4..35181cc 100644 --- a/lib/packages.sh +++ b/lib/packages.sh @@ -35,7 +35,14 @@ install_sunshine() { warn "sunshine-bin has unresolved shared library deps (rolling-Arch library drift)." warn "Falling back to the source build (AUR 'sunshine'). This takes ~5-10 minutes." ldd "$(command -v sunshine)" 2>/dev/null | grep 'not found' | sed 's/^/ /' >&2 || true - as_root pacman -Rns --noconfirm sunshine-bin + # Remove both sunshine-bin AND its sibling sunshine-bin-debug, otherwise + # the source build's sunshine-debug package collides on + # /usr/lib/debug/usr/bin/sunshine.debug. + for stale in sunshine-bin-debug sunshine-bin; do + if pacman -Qi "$stale" >/dev/null 2>&1; then + as_root pacman -Rns --noconfirm "$stale" + fi + done SUNSHINE_PKG="sunshine" yay_install sunshine if ! sunshine_runtime_deps_ok; then diff --git a/uninstall.sh b/uninstall.sh index 5f1be2f..18f67ca 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -42,7 +42,8 @@ if loginctl show-user "$USER" -p Linger --value 2>/dev/null | grep -qx yes; then fi step "Removing packages" -for pkg in sunshine sunshine-bin; do +# Remove -debug siblings first so they don't collide with re-installation later. +for pkg in sunshine-debug sunshine-bin-debug sunshine sunshine-bin; do if pacman -Qi "$pkg" >/dev/null 2>&1; then as_root pacman -Rns --noconfirm "$pkg" fi