pkg_relations(): Fix --skip-excluded, add integration test #125
Loading…
Reference in a new issue
No description provided.
Delete branch "jan/fix/20260923-fix-skip-excluded"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR fixes
pkg-requires--skip-excluded, which currently treats the platform names in a project's[build]exclude list as project specs, so a value likedebianis visited as a project and the installed-package check fails, breakingmake pkg-install-testbuild-deps. The flag now follows the documented semantics viaApp.is_excluded_from_build(), and an integration test with a fixture project tree pins the corrected behavior.cmds.projects.lib.pkg_relations(): Skip excluded modules
The
[build]exclude list names platforms (OS cascade entries) on which a project's build is excluded, not projects.pkg_relations()implements--skip-excludedby walking the seeds' exclude values as if they were project specs, so a value such asdebianis visited as a project, the installed-package check fails withUnmet dependency on debian: the -run package of project debian is not installed, andmake pkg-install-testbuild-depsbreaks.Implement the flag's documented semantics using
App.is_excluded_from_build(): an excluded seed is neither considered nor output, an excluded module in the dependency closure contributes no dependencies, and excluded modules are not output as jw dependencies. This matches whatrequired-os-pkgalready does.test/integration/projects/pkg-requires: Add
Add an integration test for
pkg-requires--skip-excludedwith a fixture project tree:excl-neverlists the platform namecentosin[build]exclude and is not excluded from the build on the test platforms,excl-allis excluded from the build everywhere, anddep-targetis a plain dependency target.The test verifies that a platform name in
[build]exclude is not treated as a project, that an excluded jw dependency is not reported with--skip-excluded, that an excluded seed is neither considered nor output, and that without the flag the excluded projects are reported with their dependencies.