Quand les plombs ptent : sjt. make-kpkg woes on linux 2.6.33


Story

For some people really in a hurry, they couldn't help notice make-kpkg would complain something like :

The UTS Release version (...) does not match current version:
Please correct this.

UTS_RELEASE has moved one more time. here is the diff I applied to /usr/share/kernel-package/ruleset/misc/version_vars.mk :

~> diff -u /usr/share/kernel-package/ruleset/misc/version_vars.mk-20100303 /usr/share/kernel-package/ruleset/misc/version_vars.mk
--- /usr/share/kernel-package/ruleset/misc/version_vars.mk-20100303	2010-03-03 12:29:35.000000000 +0100
+++ /usr/share/kernel-package/ruleset/misc/version_vars.mk	2010-03-03 12:32:39.000000000 +0100
@@ -138,11 +138,13 @@
 EXTRAV_ARG :=
 endif
 
-UTS_RELEASE_HEADER=$(call doit,if [ -f include/linux/utsrelease.h ]; then  \
+UTS_RELEASE_HEADER=$(call doit, if [ -f include/generated/utsrelease.h ]; then \
+	                       echo include/generated/utsrelease.h;            \
+			   else if [ -f include/linux/utsrelease.h ]; then  \
                           echo include/linux/utsrelease.h;            \
                       else                                            \
                                echo include/linux/version.h ;              \
-	                   fi)
+	                   fi fi)
 UTS_RELEASE_VERSION=$(call doit,if [ -f $(UTS_RELEASE_HEADER) ]; then                    \
                  grep 'define UTS_RELEASE' $(UTS_RELEASE_HEADER) |                       \
                  perl -nle  'm/^\s*\#define\s+UTS_RELEASE\s+("?)(\S+)\1/g && print $$2;';\

Or you may prefer my complete file.



updated  March 3rd 2010 - Jean-Daniel Pauget Quand les plombs ptent : sjt.