I have something which needs to be built serially, so I want to specify
--no-parallel-build which works, but if I want to cleanbuild in lxd it seems impossible.
snapcraft --no-parallel-build cleanbuild
Just returns the command line help.
I’m running snapcraft 2.29.
Is there some reason I cannot specify
cleanbuild together, or is it a bug?
Until work on Per project containers started
snapcraft cleanbuild was basically equivalent to running
snapcraft without any arguments in a LXD container.
I think we can very easily enable the argument now (that is, after New snapcraft CLI is merged).
Also, it seems like in the case where this problem came up, a specific part can’t be parallelized - so the proper fix would be to expose parallel_build_count in the YAML.
Yes. I have a large and complicated thing to snap which contains many (25+) parts, some of which can be built in parallel (make -j4 or whatever) but one or two should not (according to upstream). So ideally I’d like to be able to pass a parameter within the part which disables parallel builds. Alternatively could the autotools plugin grow a ‘make parameters’ option which let me specify -j1 ?
--no-parallel-build option is more of a make this easier to debug kind of utility. If the part does not build no matter what with parallelization enabled then it would be better to use an attribute set in the part itself.
I would propose to adding it to
BuildAttributes and do the right thing accordingly.