pkg_relations(): Fix --skip-excluded, add integration test #125

Merged
Jan Lindemann merged 2 commits from jan/fix/20260923-fix-skip-excluded into master 2026-09-23 17:50:01 +02:00 AGit
Owner

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 like debian is visited as a project and the installed-package check fails, breaking make pkg-install-testbuild-deps. The flag now follows the documented semantics via App.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-excluded by walking the seeds' exclude values as if they were project specs, so a value such as debian is visited as a project, the installed-package check fails with Unmet dependency on debian: the -run package of project debian is not installed, and make pkg-install-testbuild-deps breaks.

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 what required-os-pkg already does.

test/integration/projects/pkg-requires: Add

Add an integration test for pkg-requires --skip-excluded with a fixture project tree: excl-never lists the platform name centos in [build] exclude and is not excluded from the build on the test platforms, excl-all is excluded from the build everywhere, and dep-target is 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.

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 like `debian` is visited as a project and the installed-package check fails, breaking `make pkg-install-testbuild-deps`. The flag now follows the documented semantics via `App.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-excluded` by walking the seeds' exclude values as if they were project specs, so a value such as `debian` is visited as a project, the installed-package check fails with `Unmet dependency on debian: the -run package of project debian is not installed`, and `make pkg-install-testbuild-deps` breaks. 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 what `required-os-pkg` already does. #### test/integration/projects/pkg-requires: Add Add an integration test for `pkg-requires` `--skip-excluded` with a fixture project tree: `excl-never` lists the platform name `centos` in `[build]` exclude and is not excluded from the build on the test platforms, `excl-all` is excluded from the build everywhere, and `dep-target` is 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.
The [build] exclude list names platforms (OS cascade entries) on which a
project's build is excluded, not projects. pkg_relations() implements
--skip-excluded by walking the seeds' exclude values as if they were
project specs, so a value such as "debian" is visited as a project, the
installed-package check fails with "Unmet dependency on debian: the -run
package of project debian is not installed", and `make
pkg-install-testbuild-deps` breaks.

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 what required-os-pkg already does.

Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.87.0
Signed-off-by: Jan Lindemann <jan@janware.com>
test/integration/projects/pkg-requires: Add
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 5m53s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 8m4s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 5m23s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 7m34s
CI / Packaging test (push) Successful in 0s
8b3f4c69da
Add an integration test for pkg-requires --skip-excluded with a fixture
project tree: excl-never lists the platform name "centos" in [build]
exclude and is not excluded from the build on the test platforms, excl-all
is excluded from the build everywhere, and dep-target is 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.

Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.87.0
Signed-off-by: Jan Lindemann <jan@janware.com>
Jan Lindemann scheduled this pull request to auto merge when all checks succeed 2026-09-23 17:36:00 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
janware/jw-pkg!125
No description provided.