kernel-headers: make snapshot option more user friendly
authorPeter Korsgaard <jacmet@sunsite.dk>
Sun, 6 Dec 2009 14:40:03 +0000 (15:40 +0100)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sun, 6 Dec 2009 14:54:03 +0000 (15:54 +0100)
Closes #751.

Make kernel headers snapshot more user friendly by making it more obvious
that it's about using a local kernel snapshot, and error out with a sensible
error message if the option is enabled but no linux-2.6.tar.bz2 is present
in DL_DIR, rather than trying to fetch it from kernel.org.

Furthermore fix the bug where it tried to use linux-2.6..tar.bz2 instead of
linux-2.6.tar.bz2.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
CHANGES
toolchain/kernel-headers/Config.in
toolchain/kernel-headers/kernel-headers-new.makefile
toolchain/kernel-headers/kernel-headers.mk

diff --git a/CHANGES b/CHANGES
index 13ba876405d5afa398929698dd949b6434b7a13b..04c677bd2fc8aff00eb7d91fac529a3f995fe460 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,7 @@
 
        Issues resolved (http://bugs.uclibc.org):
 
+       #751: Kernel 2.6 snapshot fetch fail
        #753: Bump lighttpd package to 1.4.25
        #761: Add binutils 2.20 to toolchain options
 
index 2677409145d0070c679218de898f70776c334642..df0f9c803cc9a15e2fa0b2fc58342009bd41841f 100644 (file)
@@ -47,7 +47,7 @@ choice
                bool "Linux 2.6 (manually specified version)"
 
        config BR2_KERNEL_HEADERS_SNAP
-               bool "Linux 2.6 snapshot"
+               bool "Local Linux snapshot (linux-2.6.tar.bz2)"
 endchoice
 
 config BR2_KERNEL_HEADERS_RT
index 29deaae76254ffdec53ea82406d7394e9b5528fd..d0a3f2a640a71ebb699d923ce01dc2f78c3e15ca 100644 (file)
@@ -13,9 +13,10 @@ EXTRAVERSION:=$(word 4, $(LNXVER))
 LOCALVERSION:=
 
 # should contain prepended dot
+SUBLEVEL:=$(if $(SUBLEVEL),.$(SUBLEVEL),)
 EXTRAVERSION:=$(if $(EXTRAVERSION),.$(EXTRAVERSION),)
 
-LINUX_HEADERS_VERSION:=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
+LINUX_HEADERS_VERSION:=$(VERSION).$(PATCHLEVEL)$(SUBLEVEL)$(EXTRAVERSION)
 LINUX_HEADERS_SITE:=$(BR2_KERNEL_MIRROR)/linux/kernel/v2.6/
 LINUX_HEADERS_SOURCE:=linux-$(LINUX_HEADERS_VERSION).tar.bz2
 LINUX_HEADERS_CAT:=$(BZCAT)
index 1f637f9660f77c1eb230127ef1ef60c2e21792ee..8046ef474d39645d50e8847d9fa375ded53ae2b1 100644 (file)
@@ -24,6 +24,9 @@ KERNEL_ARCH:=$(shell $(SHELL) -c "echo \"$(ARCH)\" | sed -e \"s/-.*//\" \
 include toolchain/kernel-headers/kernel-headers-new.makefile
 
 $(DL_DIR)/$(LINUX_HEADERS_SOURCE):
+ifeq ($(BR2_KERNEL_HEADERS_SNAP),y)
+       $(error No local $@ found, cannot continue. Are you sure you wanted to enable BR2_KERNEL_HEADERS_SNAP?)
+endif
        $(call DOWNLOAD,$(LINUX_HEADERS_SITE),$(LINUX_HEADERS_SOURCE))
 
 kernel-headers: $(LINUX_HEADERS_DIR)/.configured