From 8d7128241af2e74adcfea64ebd54a5264fbc1eb0 Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Fri, 15 May 2026 01:19:57 +0200 Subject: [PATCH] fix: PYTHONPATH in screen locker status check; sudo for steam enforcer install --- .../evidence/fix-install-failures.json | 20 +++++++++++++++++++ linux_configuration/install_core_system.sh | 2 +- python_pkg/screen_locker/install_systemd.sh | 2 +- 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 docs/superpowers/evidence/fix-install-failures.json diff --git a/docs/superpowers/evidence/fix-install-failures.json b/docs/superpowers/evidence/fix-install-failures.json new file mode 100644 index 0000000..9eab5a2 --- /dev/null +++ b/docs/superpowers/evidence/fix-install-failures.json @@ -0,0 +1,20 @@ +{ + "intent": "Fix two failures in install_core_system.sh run: workout locker PYTHONPATH and steam enforcer sudo", + "scope": [ + "python_pkg/screen_locker/install_systemd.sh", + "linux_configuration/install_core_system.sh" + ], + "changes": [ + "install_systemd.sh: set PYTHONPATH to repo root before running screen_lock.py status check so python_pkg is importable", + "install_core_system.sh: call steam backlog enforcer installer with sudo so EUID check passes for systemd service install" + ], + "verification": [ + { + "command": "shellcheck python_pkg/screen_locker/install_systemd.sh linux_configuration/install_core_system.sh", + "result": "pass", + "evidence": "no warnings" + } + ], + "risks": ["sudo on steam enforcer installs pip packages as root; acceptable since --break-system-packages is already used"], + "rollback": ["git revert HEAD"] +} diff --git a/linux_configuration/install_core_system.sh b/linux_configuration/install_core_system.sh index 6261b1d..a5e827b 100755 --- a/linux_configuration/install_core_system.sh +++ b/linux_configuration/install_core_system.sh @@ -141,7 +141,7 @@ run_installer "Midnight shutdown timer" \ printf '\n%s\n' "$(bold "Secondary modules (${SECONDARY_MODE})…")" ask_install "Steam backlog enforcer" \ - bash "$REPO_ROOT/python_pkg/steam_backlog_enforcer/install.sh" + sudo bash "$REPO_ROOT/python_pkg/steam_backlog_enforcer/install.sh" ask_install "Pacman wrapper" \ bash "$LINUX_CONFIG/scripts/periodic_background/digital_wellbeing/pacman/install_pacman_wrapper.sh" diff --git a/python_pkg/screen_locker/install_systemd.sh b/python_pkg/screen_locker/install_systemd.sh index aa07798..e353eed 100755 --- a/python_pkg/screen_locker/install_systemd.sh +++ b/python_pkg/screen_locker/install_systemd.sh @@ -89,4 +89,4 @@ fi # Immediately check if today's workout is done; block if not echo "" echo "=== Checking today's workout status ===" -python3 "$SCREEN_LOCK_PATH" --production +PYTHONPATH="$(cd "$SCRIPT_DIR/../.." && pwd)" python3 "$SCREEN_LOCK_PATH" --production