Only compare the first two version numbers when not comparing two 2.6 kernel versions.
Signed-off-by: Jonas Gorski <jonas.gorski+open...@gmail.com> --- This also needs to be backported for backfire, to properly compare with 3.0. While technically this breaks comparison between two 2.4 kernels, this is a non-issue for backfire since there is only exactly one 2.4 kernel. include/kernel.mk | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/include/kernel.mk b/include/kernel.mk index 5e8df44..fa620a7 100644 --- a/include/kernel.mk +++ b/include/kernel.mk @@ -164,8 +164,11 @@ endef ifdef DUMP CompareKernelPatchVer=0 else + mj_mn=$(call merge_version,$(wordlist 1,2,$(call split_version,$(1)))) define CompareKernelPatchVer - $(shell [ $$(echo $(1) | tr . 0) -$(2) $$(echo $(3) | tr . 0) ] && echo 1 || echo 0) + $(if $(findstring 2.6.2.6.,$(findstring 2.6.,$(1))$(findstring 2.6.,$(3))), \ + $(shell [ $$(echo $(1) | tr . 0) -$(2) $$(echo $(3) | tr . 0) ] && echo 1 || echo 0), \ + $(shell [ $$(echo $(call mj_mn,$(1)) | tr . 0) -$(2) $$(echo $(call mj_mn,$(3)) | tr . 0) ] && echo 1 || echo 0)) endef endif -- 1.7.2.5 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel