fix(cli): register the integration commands on the installed entry point - #93
Merged
srpatcha merged 2 commits intoSep 1, 2026
Conversation
Signed-off-by: Joonyoung Cho <fromochatime@gmail.com>
srpatcha
previously approved these changes
Sep 1, 2026
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
The installed
ebuildconsole script did not expose five documented commands:integration,qemu,sdk,package, andmodels.pyproject.tomlmaps the console script directly toebuild.cli.commands:cli, while these five commands are defined inebuild/cli/integration.pyand attached throughregister_commands().Previously,
register_commands()was only called fromebuild/__main__.py, which runs forpython -m ebuildbut not for the installedebuildconsole script.As a result:
python -m ebuild --helpexposed all 25 commands.ebuild --helpexposed only 20 commands.ebuild sdkfailed withNo such command.This change registers the integration commands directly on the CLI group so both entry points expose the same command set.
Type of Change
Changes
ebuild/cli/commands.pyto callregister_commands(cli)after the CLI group and its commands are defined.ebuild/__main__.py.tests/unit/test_integration_commands_registered.pywith regression coverage for all five commands and both CLI entry points.Testing
Test environment:
Full test suite:
Manual validation:
Confirmed that the installed console script now exposes:
The new regression suite also verifies that:
--helpsucceeds for each command;ebuildandpython -m ebuildexpose the same command set;[project.scripts]continues to point to the CLI object being tested.Pre-Submission Checklist
-Wall -Wextra -Werrorfor C)<type>(<scope>): <description>conventionRelated Issues
No issue is closed by this PR.
Related: #77 introduces a different
packagecommand.integration.pyalready defines apackagecommand for producing a hardware-target deliverable ZIP, so if both implementations remain, the project may need to decide which behavior should own theebuild packagecommand name.This PR does not attempt to resolve that separate design question.
Screenshots / Logs
Before this change:
The installed console script exposed 20 commands while
python -m ebuildexposed 25.After this change:
ebuild --helpnow exposes the same five previously missing commands:integration,models,package,qemu, andsdk.Additional Notes
Registering the commands on the CLI group itself, rather than changing the
[project.scripts]entry point, keeps the installedebuildcommand,python -m ebuild, and code that importscliusing the same command set.There is no import cycle introduced by this change:
integration.pyimportsebuild.cli.logger,ebuild.system.rootfs, andebuild, none of which importebuild.cli.commands.A separate related issue exists in the plugin system:
discover_plugins(),register_plugin_commands(), and the plugin notification hooks are currently not wired into CLI startup despite being documented. That is intentionally outside the scope of this PR.