Fix helper venv and gamepad discovery#39
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves installation robustness and gamepad discovery reliability by ensuring the Python helper virtualenv is recreated on install (avoiding breakage after OS Python upgrades) and by filtering input devices using udev metadata before attempting evdev inspection.
Changes:
- Recreate the helper Python virtualenv during install using
python3 -m venv --clear. - Add a release-bundle smoke-test assertion that stale venv contents are cleared during install.
- Introduce udev-based pre-filtering for
/dev/input/event*nodes and add test coverage for joystick/mouse/keyboard classification and DualSense-like devices.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| scripts/test-release-bundle.sh | Adds a smoke-test marker to verify install clears stale venv contents. |
| install.sh | Recreates the Python helper venv with --clear to avoid stale interpreter-specific site-packages. |
| crates/lg-buddy/src/session/gamepad/devices.rs | Adds udev metadata parsing/classification to skip known non-gamepad devices before evdev open; expands tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
bscpylgtvinstalled under an old interpreter versionValidation
bash -n install.sh uninstall.sh configure.sh bin/LG_Buddy_Common scripts/build-release-bundle.sh scripts/test-release-bundle.sh scripts/publish-release-assets.shcargo fmt --all --checkcargo test -p lg-buddy session::gamepad::devices --libcargo test -p lg-buddy --lib--skip-pip-installduring local diagnosis