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

2026-09-23

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
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>
2026-09-23 17:35:58 +02:00
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.

Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.87.0
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-09-23 17:35:58 +02:00