It is impossible to filter out modules in a kdesrc-build run using --ignore-modules [modules ... ], either at cmdline or in the rcfile, if those modules would be picked up by --include-dependencies. Testcase: "kdesrc-build --include-dependencies -p dolphin --ignore-modules khtml" should avoid building KHTML, but does not. The same is true if equivalent options are set in the config file. Reported on IRC.
So I took a look today and tested a few fixes locally on my system, but still haven't fully resolved. Though it seems to me at this point that it won't be as easy as I was thinking to figure out. :(
Git commit ca30f09b511e1058a6f47ed43f1e9d1ced118bd8 by Michael Pyne. Committed on 27/05/2018 at 20:36. Pushed by mpyne into branch 'master'. Add testcase for bug 394497 (ignore-modules/include-dependencies). This adds a testcase that would fail without the bugfix for bug 394497 and now passes. This did require undoing some of the changes to generateModuleList but the only real behavior change (beside merging duplicate ignored module checks) was to move the step that generates module dependencies to occur earlier so that it can happen before the filter steps M +42 -47 modules/ksb/Application.pm A +51 -0 t/bug-394497-ignore-dep-module.t https://commits.kde.org/kdesrc-build/ca30f09b511e1058a6f47ed43f1e9d1ced118bd8