The patch from Message #35 does *NOT* create usable linux-headers package for
x86/i386. The symlink include/asm needs to point to asm-x86 as opposed to 
asm-i386
which does not exist there anymore. Attached is the improved/corrected version 
of
the patch.
diff -U 3 -H -d -r -N -- kernel-package-11.001/kernel/pkg/headers/postinst kernel-package-11.001-fix/kernel/pkg/headers/postinst
--- kernel-package-11.001/kernel/pkg/headers/postinst	2007-05-05 07:48:30.000000000 +0200
+++ kernel-package-11.001-fix/kernel/pkg/headers/postinst	2008-03-10 15:59:45.000000000 +0100
@@ -78,6 +78,7 @@
 $architecture = "parisc" if $architecture eq "hppa";
 $architecture = "mips" if $architecture eq "mipsel";
 $architecture = "x86_64" if $architecture eq "amd64";
+$architecture = "x86" if $architecture eq "i386";
 
 my $stop_and_read     = 0;
 my $src_postinst_hook = '';
diff -U 3 -H -d -r -N -- kernel-package-11.001/kernel/ruleset/targets/headers.mk kernel-package-11.001-fix/kernel/ruleset/targets/headers.mk
--- kernel-package-11.001/kernel/ruleset/targets/headers.mk	2007-05-05 07:48:30.000000000 +0200
+++ kernel-package-11.001-fix/kernel/ruleset/targets/headers.mk	2008-03-10 15:59:14.000000000 +0100
@@ -70,12 +70,22 @@
 	$(install_file) Makefile                           $(SRCDIR)
 	test ! -e Rules.make || $(install_file) Rules.make $(SRCDIR)
 	test ! -e .kernelrelease || $(install_file) .kernelrelease $(SRCDIR)
+	$(make_directory)	$(SRCDIR)/arch/x86/
 	test ! -e arch/$(KERNEL_ARCH)/Makefile     ||                             \
                                 $(install_file) arch/$(KERNEL_ARCH)/Makefile      \
                                                      $(SRCDIR)/arch/$(KERNEL_ARCH)
 	test ! -e arch/$(KERNEL_ARCH)/Makefile.cpu ||                             \
                                 $(install_file) arch/$(KERNEL_ARCH)/Makefile.cpu  \
                                                      $(SRCDIR)/arch/$(KERNEL_ARCH)
+	test ! -e arch/x86/Makefile_32 ||                             \
+                                 $(install_file) arch/x86/Makefile_32  \
+                                                     $(SRCDIR)/arch/x86/Makefile_32
+	test ! -e arch/x86/Makefile_32.cpu ||                         \
+                                $(install_file) arch/x86/Makefile_32.cpu  \
+                                                     $(SRCDIR)/arch/x86/Makefile_32.cpu
+	test ! -e arch/x86/Makefile_64 ||                             \
+                                $(install_file) arch/x86/Makefile_64  \
+                                                     $(SRCDIR)/arch/x86/Makefile_64
 	test ! -e Rules.make     || $(install_file) Rules.make     $(SRCDIR)
 	test ! -e Module.symvers || $(install_file) Module.symvers $(SRCDIR)
 ifneq ($(strip $(int_follow_symlinks_in_src)),)
--- kernel-package-11.001/kernel/pkg/headers/postinst.orig	2008-06-17 20:49:21.000000000 +0000
+++ kernel-package-11.001/kernel/pkg/headers/postinst	2008-06-17 20:59:07.000000000 +0000
@@ -54,7 +54,7 @@
 my $kernel_arch       = "=B";
 my $ramdisk           = "=MK";  # List of tools to create initial ram fs.
 my $initrddep         = "=MD";  # List of dependencies for such tools
-my $package_name    = "=ST-image-$version";
+my $package_name      = "=ST-headers-$version";
 
 
 # Ignore all invocations uxcept when called on to configure.
@@ -88,25 +88,13 @@
 
 if (-d "$package_name") {
 
-
-  # See if we have a kernel image of the same version already installed.
-  if ( -d "$modules_base/$version" && -d "/usr/src/$package_name" ) {
-    if (! -e "$modules_base/$version/build" ) {
-      my $result = symlink ("/usr/src/=ST-headers-$version",
-                            "$modules_base/$version/build");
-      if (! $result) {
-        warn "Could not link /usr/src/=ST-headers-$version to $modules_base/$version/build:$!"
-      }
-    }
-  }
-
   chdir "/usr/src/$package_name/include" ||
     die "Could not chdir to  /usr/src/$package_name/include:$!";
 
   if (! -d "asm-$architecture") {
     warn "/usr/src/$package_name/include/asm-$architecture does not exist.\n";
   }
-  elsif (-e 'asm') {
+  elsif (-e 'asm' || -l 'asm') {
     if (! -l 'asm') {
       warn "/usr/src/$package_name/include/asm is not a symlink.\n";
       $stop_and_read++;

Reply via email to