Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
quilt.mk: don't error on refresh/update if patches doesn't exist
The current code fails if we have package or host tools with no patches to apply. The error printend is the following: (taking ubus as an example) make[2]: Entering directory '/home/ansuel/openwrt-ansuel/openwrt/scripts/config' make[2]: 'conf' is up to date. make[2]: Leaving directory '/home/ansuel/openwrt-ansuel/openwrt/scripts/config' make[1]: Entering directory '/home/ansuel/openwrt-ansuel/openwrt' make[2]: Entering directory '/home/ansuel/openwrt-ansuel/openwrt/package/system/ubus' The source directory contains no quilt patches. make[2]: *** [Makefile:81: quilt-check] Error 1 make[2]: Leaving directory '/home/ansuel/openwrt-ansuel/openwrt/package/system/ubus' time: package/system/ubus/refresh#0.06#0.00#0.07 ERROR: package/system/ubus failed to build. make[1]: *** [package/Makefile:120: package/system/ubus/refresh] Error 1 make[1]: Leaving directory '/home/ansuel/openwrt-ansuel/openwrt' make: *** [/home/ansuel/openwrt-ansuel/openwrt/include/toplevel.mk:232: package/ubus/refresh] Error 2 This error is wrong and actually caused by quilt-check trying to find patches while in reality the package doesn't have any patch to refresh. To better handle this case, introduce a fake Quilt define template that just print a warning message indicating the user that the refresh/update is skipped and exit succesfully and use these fake define only if we detect that the patches directory is empty or non existent. Example: make[2]: Entering directory '/home/ansuel/openwrt-ansuel/openwrt/scripts/config' make[2]: 'conf' is up to date. make[2]: Leaving directory '/home/ansuel/openwrt-ansuel/openwrt/scripts/config' make[1]: Entering directory '/home/ansuel/openwrt-ansuel/openwrt' make[2]: Entering directory '/home/ansuel/openwrt-ansuel/openwrt/package/system/ubus' Skipping refresh. /home/ansuel/openwrt-ansuel/openwrt/package/system/ubus/patches doesn't exist or is empty. make[2]: Leaving directory '/home/ansuel/openwrt-ansuel/openwrt/package/system/ubus' time: package/system/ubus/refresh#0.05#0.00#0.07 make[1]: Leaving directory '/home/ansuel/openwrt-ansuel/openwrt' This is needed to support run like package/refresh that will run the refresh process on any package present in the buildroot. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
- Loading branch information