projects.py: Make dep flavour "build" a superset of "run"

If P1 build-needs P2, make it run-need P2, too, since with the current
dependency resolution algorithm, this also adds everything needed to _run_ P2.
Which is the only thing this commit is after. It actually does too much, and
enables P1 to run, too, at least WRT P2. But that's the easiest way to resolve
the problem for now.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2019-12-27 14:43:29 +00:00
commit f8df5c6825

View file

@ -740,6 +740,9 @@ class Projects(object):
args = parser.parse_args(args_)
modules = args.module
flavours = args.flavours.split()
if 'build' in flavours and not 'run' in flavours:
# TODO: This adds too much. Only the run dependencies of the build dependencies would be needed.
flavours.append('run')
self.debug("flavours = " + args.flavours)
deps = self.get_modules_from_project_txt(modules, ['pkg.requires.jw'], flavours,
scope = 2, add_self=True, names_only=True)