cpb- / yocto-cooker

Meta buildtool for Yocto Project based Linux embedded systems
GNU General Public License v2.0
43 stars 22 forks source link

coocker/cooker.py: build command should not try to build configuratio… #85

Closed RomainNaour closed 3 years ago

RomainNaour commented 3 years ago

…n template

Since commit 356a75a3584d8d52200ec8737b38d53548c4b20a, the build function must check if the build configuration is not a template.

Signed-off-by: Romain Naour romain.naour@smile.fr

pboettch commented 3 years ago

We need tests for that before merging.

pboettch commented 3 years ago

I'm currently looking into this.

pboettch commented 3 years ago

Sorry for overriding you with my PR #86 . Could you please check whether it fixes the bug you found?

pboettch commented 3 years ago

My PR is missing the check in build().

There is not test for it, so it doesn't fail. 😢

pboettch commented 3 years ago

In fact it works, because target() return None if no target is set in the build or any of its parents.

RomainNaour commented 3 years ago

In fact it works, because target() return None if no target is set in the build or any of its parents.

Indeed, but None is not a Yocto target :p I didn't had time to write a test to check this case, I just push the fix I did. I'll test your patch asap, sorry for the mess...

cpb- commented 3 years ago

Thank you Romain. The same feature is included in PR#86 (which contains a test :-) )

pboettch commented 3 years ago

That's right.

It's this code:

if not BuildConfiguration.ALL[build].target():
    fatal_error('build has no target:', build)

it's filter_build_configs() which errors out if a build with no target (None) is requested by the user. fatal_error('build has no target:', build)

cpb- commented 3 years ago

@RomainNaour feel free to reopen this PR if you want.