Package: kernel-package
Version: 12.036+nmu1.1
Followup-For: Bug #639123

This issue is similar as #635563.

I use this patch to solve the issue with broken symlinks and kernel version
3.x:

hamer@h13e:~/download/kernel-package$ cat kernel-package_headers.diff
diff -Naurb kernel-package-12.036+nmu1.orig//kernel/ruleset/targets/headers.mk
kernel-package-12.036+nmu1.1//kernel/ruleset/targets/headers.mk
--- kernel-package-12.036+nmu1.orig//kernel/ruleset/targets/headers.mk
2009-09-11 17:24:42.000000000 +0300
+++ kernel-package-12.036+nmu1.1//kernel/ruleset/targets/headers.mk
2011-10-10 12:24:47.734584775 +0300
@@ -31,7 +31,7 @@
###############################################################################

 LINK_ARCH=$(KERNEL_ARCH)
-ifeq ($(shell if [ $(PATCHLEVEL) -eq 6 ] && [ $(SUBLEVEL) -gt 23 ] ; then \
+ifeq ($(shell if [ $(VERSION) -eq 3 ] || [ $(PATCHLEVEL) -eq 6 -a $(SUBLEVEL)
-gt 23 ] ; then \
     if [ $(KERNEL_ARCH) = "i386" ] || [ $(KERNEL_ARCH) = "x86_64" ] ; then \
                echo "yes" ; fi ; fi ),yes)
        LINK_ARCH=x86
@@ -101,7 +101,7 @@
        -tar cfh - scripts       |   (cd $(SRCDIR); umask 000; tar xsf -)
        test ! -e arch/powerpc/lib/crtsavres.o ||
\
           tar cfh - arch/powerpc/lib/crtsavres.o | (cd $(SRCDIR); umask 000;
tar xsf -)
-       (cd $(SRCDIR)/include;   rm -rf asm; ln -s asm-$(LINK_ARCH) asm)
+       (cd $(SRCDIR)/include;   rm -rf asm; ln -s
.../arch/$(LINK_ARCH)/include/asm asm)
        find . -path './scripts/*'   -prune -o -path './Documentation/*' -prune
-o  \
                -path './debian/*'    -prune -o -type f
\
                \( -name Makefile -o  -name 'Kconfig*' \) -print  |
\
@@ -115,7 +115,7 @@
        -tar cf - scripts |        (cd $(SRCDIR); umask 000; tar xsf -)
        test ! -e arch/powerpc/lib/crtsavres.o ||
\
           tar cfh - arch/powerpc/lib/crtsavres.o | (cd $(SRCDIR); umask 000;
tar xsf -)
-       (cd       $(SRCDIR)/include; rm -f asm; ln -s asm-$(LINK_ARCH) asm)
+       (cd       $(SRCDIR)/include; rm -f asm; ln -s
.../arch/$(LINK_ARCH)/include/asm asm)
        find . -path './scripts/*' -prune -o -path './Documentation/*' -prune
-o  \
                -path './debian/*'  -prune -o -type f
\
                \( -name Makefile -o -name 'Kconfig*' \) -print |
\



-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (600, 'testing'), (500, 'unstable'), (400, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 3.0.6-zen+ (SMP w/4 CPU cores)
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages kernel-package depends on:
ii  binutils           2.21.52.20110606-2
ii  build-essential    11.5
ii  debianutils        4.0.2
ii  file               5.08-1
ii  gettext            0.18.1.1-4
ii  make               3.81-8.1
ii  module-init-tools  3.16-1
ii  po-debconf         1.0.16+nmu1
ii  util-linux         2.19.1-5

Versions of packages kernel-package recommends:
ii  cpio  2.11-7

Versions of packages kernel-package suggests:
pn  btrfs-tools                             <none>
pn  bzip2                                   1.0.5-7
pn  docbook-utils                           <none>
pn  e2fsprogs                               1.42~WIP-2011-07-02-1
pn  grub | grub2                            <none>
pn  initramfs-tools [linux-initramfs-tool]  0.99
pn  jfsutils                                <none>
pn  libncurses5-dev [libncurses-dev]        5.9-2
pn  linux-source | kernel-source            <none>
pn  mcelog                                  <none>
pn  oprofile                                <none>
pn  pcmciautils                             018-4
pn  ppp                                     2.4.5-5
pn  procps                                  1:3.2.8-11
pn  quota                                   <none>
pn  reiserfsprogs                           <none>
pn  squashfs-tools                          <none>
pn  udev                                    172-1
pn  xfsprogs                                <none>
pn  xmlto                                   <none>
diff -Naurb kernel-package-12.036+nmu1.orig//kernel/ruleset/targets/headers.mk kernel-package-12.036+nmu1.1//kernel/ruleset/targets/headers.mk
--- kernel-package-12.036+nmu1.orig//kernel/ruleset/targets/headers.mk	2009-09-11 17:24:42.000000000 +0300
+++ kernel-package-12.036+nmu1.1//kernel/ruleset/targets/headers.mk	2011-10-10 12:24:47.734584775 +0300
@@ -31,7 +31,7 @@
 ###############################################################################
 
 LINK_ARCH=$(KERNEL_ARCH)
-ifeq ($(shell if [ $(PATCHLEVEL) -eq 6 ] && [ $(SUBLEVEL) -gt 23 ] ; then \
+ifeq ($(shell if [ $(VERSION) -eq 3 ] || [ $(PATCHLEVEL) -eq 6 -a $(SUBLEVEL) -gt 23 ] ; then \
     if [ $(KERNEL_ARCH) = "i386" ] || [ $(KERNEL_ARCH) = "x86_64" ] ; then \
 		echo "yes" ; fi ; fi ),yes)
 	LINK_ARCH=x86
@@ -101,7 +101,7 @@
 	-tar cfh - scripts       |   (cd $(SRCDIR); umask 000; tar xsf -)
 	test ! -e arch/powerpc/lib/crtsavres.o ||                                  \
           tar cfh - arch/powerpc/lib/crtsavres.o | (cd $(SRCDIR); umask 000; tar xsf -)
-	(cd $(SRCDIR)/include;   rm -rf asm; ln -s asm-$(LINK_ARCH) asm)
+	(cd $(SRCDIR)/include;   rm -rf asm; ln -s ../arch/$(LINK_ARCH)/include/asm asm)
 	find . -path './scripts/*'   -prune -o -path './Documentation/*' -prune -o  \
                -path './debian/*'    -prune -o -type f                              \
                \( -name Makefile -o  -name 'Kconfig*' \) -print  |                  \
@@ -115,7 +115,7 @@
 	-tar cf - scripts |        (cd $(SRCDIR); umask 000; tar xsf -)
 	test ! -e arch/powerpc/lib/crtsavres.o ||                                  \
           tar cfh - arch/powerpc/lib/crtsavres.o | (cd $(SRCDIR); umask 000; tar xsf -)
-	(cd       $(SRCDIR)/include; rm -f asm; ln -s asm-$(LINK_ARCH) asm)
+	(cd       $(SRCDIR)/include; rm -f asm; ln -s ../arch/$(LINK_ARCH)/include/asm asm)
 	find . -path './scripts/*' -prune -o -path './Documentation/*' -prune -o  \
                -path './debian/*'  -prune -o -type f                              \
                \( -name Makefile -o -name 'Kconfig*' \) -print |                  \

Reply via email to