Repository navigation
fix(install): only a running desktop stops the install; detect desktops by metapackage - #781
Conversation
The Lite check matched any installed package starting with gnome/kde/ xfce/lxde, so standalone parts (gnome-keyring, xfce4-terminal, lxde-icon-theme) rejected a Lite system. Match whole names of desktop metapackages and session managers instead. Also catch desktops the prefixes missed: Raspberry Pi OS Trixie replaced raspberrypi-ui-mods with rpd-wayland-core / rpd-x-core, Debian tasksel desktops (task-*-desktop), and multi-arch names (plasma-workspace:arm64). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VZNWFWprcFYGfuf1JAyrBJ
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe installer now distinguishes a running desktop from installed desktop components. A running display manager fails the OS check. Installed desktop packages or session files without a running display manager produce a warning and allow installation to continue. The common-module README now documents ChangesDesktop detection
ESPN payload module documentation
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The installer changes are ready to merge after normal checks. The README’s slimming claim can be qualified separately. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 2 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Up to standards ✅🟢 Issues
|
#749 added src/common/espn_payload.py without a summary row or section, so test_common_readme_lists_every_module fails on main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VZNWFWprcFYGfuf1JAyrBJ (cherry picked from commit 8333f23)
|
Fix: #782 adds the README row and section. I've carried the same commit into this PR (42455f6), so this PR should go green, and that commit becomes a no-op here once #782 merges. Generated by Claude Code |
A desktop costs the panel CPU only while it runs, so a running display manager (checked with systemctl is-active, including the generic display-manager alias, instead of a grep -q pipe under pipefail) still stops the installer. Desktop packages or session files on a Pi that boots to the console now print a warning and the install continues. Adds installer OS-check tests for running, installed-only and Lite systems, including the libblockdev and gnome-keyring false positives. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VZNWFWprcFYGfuf1JAyrBJ
Pull Request
Summary
Follow-up to #780. The installer's "Lite only" check is meant to stop installs where a desktop competes with the LED panel for CPU, but its package check kept firing on Lite systems: first
libblockdev-*(#780), then anything starting withgnome/kde/xfce/lxde, e.g.gnome-keyring(CodeRabbit on #780).This PR changes what each signal does:
display-manager, lightdm, gdm, sddm, lxdm)/usr/share/xsessions,/usr/share/raspberrypi-ui-mods)A desktop that is installed but not running costs the panel nothing. The stop message now gives the fix:
sudo systemctl set-default multi-user.target, then reboot.Other changes:
systemctl list-units | grep -qunderpipefail, the pattern this script's own comment warns can turn a match into "not found". It now usessystemctl is-active, and addsdisplay-manager, the alias every Debian display manager registers.gnome-keyring,xfce4-terminal,lxde-icon-theme, ...) no longer count. The list now also covers Raspberry Pi OS Trixie, which replacedraspberrypi-ui-modswithrpd-wayland-core/rpd-x-core, plus Debian tasksel desktops (task-desktop,task-*-desktop) and multi-arch names (plasma-workspace:arm64).docs/TROUBLESHOOTING.mdupdated for the new message.espn_payload(commit 42455f6), which unblocksCore unit testsonmain. It becomes a no-op once docs(common): list espn_payload in the common README #782 merges.Type of change
Related issues
Refs #780 (CodeRabbit's
gnome-keyringfinding).Test plan
test/test_install_os_support.py. They run the installer's real OS-check section, with stubbedsystemctl/dpkg-queryand a fake/etc/os-release:display-manager/lightdm/gdm/sddmstops the install;libblockdev-*,gnome-keyring,xfce4-terminal,lxde-icon-theme, etc. is confirmed Lite with no warning.main's installer, 16 of the 17 new tests fail. The one that passes is thelibblockdevcase, already fixed in fix(install): stop libblockdev matching the desktop-environment check #780. With this change all 17 pass.pytest test/test_install_os_support.py: 68 passed.bash -n first_time_install.shpasses.Documentation
docs/if developer behavior changed (docs/TROUBLESHOOTING.md)Plugin compatibility
Checklist
CONTRIBUTING.mdCONTRIBUTING.mdandCODE_OF_CONDUCT.mdNotes for reviewer
The change is non-destructive: the check only decides whether the installer proceeds, and nothing is installed or removed by it. The behavioural change to review is intentional: a Pi with a desktop installed but booting to the console now installs, with a warning, where it used to stop. The README's "stops on the desktop edition" still holds, because the desktop image boots into its display manager.
🤖 Generated with Claude Code
https://claude.ai/code/session_01VZNWFWprcFYGfuf1JAyrBJ
Summary by CodeRabbit