简体   繁体   中英

How to cause build system to fail compilation in case patch fail to apply

I'm using an OpenWRT environment for code development.

Now, OpenWRT build works by first fetching a package from remote repository, extract it and later apply local patches on top of that code.

What I've noticed is that in case the patch fails to apply, the build itself not always fail, and that creates problems from entire system perspective.

I'm looking for a way to define that in case a patch is fail to apply, the entire build will fail.

Thank you all in advance!

According to the documentation , the easiest way to spot build failures would be to run make V=s 2>&1 | tee build.log | grep -i '[^_-"az]error[^_-.az]' make V=s 2>&1 | tee build.log | grep -i '[^_-"az]error[^_-.az]' make V=s 2>&1 | tee build.log | grep -i '[^_-"az]error[^_-.az]' .

If you know you are having issues with a specific package, I would specifically build those packages via make package/<pkgname>/compile V=s and see where it is failing.

Also, I would try testing the image out in qemu before flashing a real device. That way you can verify your build.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM