Don't reinstall sunshine when a working build is already present
Bug: install_sunshine always called yay_install on $SUNSHINE_PKG (default sunshine-bin) before checking ldd. If the host already had sunshine (source build) working, the bin install would replace it, trip the ldd check, and the auto-recovery would rebuild source — a redundant 10-minute compile on every ./install.sh re-run. Fix: short-circuit at the top of install_sunshine when either sunshine or sunshine-bin is already installed AND all its shared libs resolve. The recovery dance only runs when there's actually something to fix.
This commit is contained in:
@@ -10,6 +10,21 @@
|
|||||||
install_sunshine() {
|
install_sunshine() {
|
||||||
# Ensure runtime deps useful for capture/diagnostics across vendors.
|
# Ensure runtime deps useful for capture/diagnostics across vendors.
|
||||||
yay_install pipewire-pulse vulkan-tools libva-utils jq
|
yay_install pipewire-pulse vulkan-tools libva-utils jq
|
||||||
|
|
||||||
|
# If a working sunshine (source build) is already installed, don't touch it.
|
||||||
|
# Otherwise re-running install.sh would replace the source build with
|
||||||
|
# sunshine-bin (the default $SUNSHINE_PKG), trip the ldd check, then rebuild
|
||||||
|
# from source — a redundant ~10 minute compile on every re-run.
|
||||||
|
if pkg_installed sunshine && sunshine_runtime_deps_ok; then
|
||||||
|
ok "sunshine (source build) already installed with all shared libs resolved"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
# Same idempotency for sunshine-bin when it happens to be working.
|
||||||
|
if pkg_installed sunshine-bin && sunshine_runtime_deps_ok; then
|
||||||
|
ok "sunshine-bin already installed and runtime deps resolved"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
yay_install "$SUNSHINE_PKG"
|
yay_install "$SUNSHINE_PKG"
|
||||||
|
|
||||||
# sunshine-bin is a precompiled AUR package; it breaks whenever Arch bumps a
|
# sunshine-bin is a precompiled AUR package; it breaks whenever Arch bumps a
|
||||||
|
|||||||
Reference in New Issue
Block a user