[kernel] r14589 - dists/trunk/linux-2.6/debian/templates/temp.image.plain

Maximilian Attems maks at alioth.debian.org
Sun Nov 8 20:39:42 UTC 2009


Author: maks
Date: Sun Nov  8 20:39:41 2009
New Revision: 14589

Log:
Really fix missing kernel-img.conf makes a debian kernel not installable

There is no /etc/kernel-img.con on a fresh debootstrap sid. Installing a
kernel leads to:

|mikejones:/var/lib# dpkg --configure -a
|Setting up linux-image-2.6.31-1-amd64 (2.6.31-1) ...
|Running depmod.
|Running update-initramfs.
|update-initramfs: Generating /boot/initrd.img-2.6.31-1-amd64
|Error retreiving answer for linux-image-2.6.31-1-amd64/postinst/create-kimage-link-2.6.31-1-amd64:
| linux-image-2.6.31-1-amd64/postinst/create-kimage-link-2.6.31-1-amd64 doesn't exist at
| /var/lib/dpkg/info/linux-image-2.6.31-1-amd64.postinst line 522, <STDIN> line 3.
|dpkg: error processing linux-image-2.6.31-1-amd64 (--configure):
| subprocess installed post-installation script returned error exit status 9

As far as I understand debconf, there must be a template and input() for
${package_name}/postinst/create-kimage-link-$version in order to get a
value saved. Since I did not find it I guess that this can't work.

If the bootloader is palo than the answer is ignored anyway so the
question is not required there.

kernel-img.conf(5) says that do_symlinks defaults to yes.

This could also fix piuparts [0].

[0] http://piuparts.debian.org/sid/fail/linux-image-2.6.31-1-amd64_2.6.31-1.log

[ nuked that template in question and this is indeed the right fix
  instead of reprompting user for useless questions.
  Add a comment and keep current ordering. -maks ]

Signed-off-by: Sebastian Andrzej Siewior <sebastian at breakpoint.cc>

Really fix making a debian kernel installable without kernel-img.conf.

boah the code below this with reverse links must die pretty soon.

thanks for good analysis and bug report.

Modified:
   dists/trunk/linux-2.6/debian/templates/temp.image.plain/postinst

Modified: dists/trunk/linux-2.6/debian/templates/temp.image.plain/postinst
==============================================================================
--- dists/trunk/linux-2.6/debian/templates/temp.image.plain/postinst	Sun Nov  8 20:39:28 2009	(r14588)
+++ dists/trunk/linux-2.6/debian/templates/temp.image.plain/postinst	Sun Nov  8 20:39:41 2009	(r14589)
@@ -514,17 +514,9 @@
   else {
     if (! $have_conffile) {
       my $ret;
-      my $answer='';
+      # current default
       $do_symlink = "Yes";
-      my $question = "${package_name}/postinst/create-kimage-link-$version";
 
-      ($ret,$answer) = get("$question");
-      die "Error retreiving answer for $question: $answer" if $ret;
-
-      $answer =~ s/^\s+//;
-      $answer =~ s/\s+$//;
-      $do_symlink = "No" if $answer =~ /^(f|n)/i;
-        
       if (open(CONF, ">$CONF_LOC")) {
         print CONF "# Kernel Image management overrides\n";
         print CONF "# See kernel-img.conf(5) for details\n";
@@ -533,8 +525,6 @@
           print CONF "do_symlinks = Yes\n";
           print CONF "relative_links = Yes\n";
           print CONF "do_bootloader = No\n";
-        } else {
-          print CONF "do_symlinks = $do_symlink\n";
         }
         close CONF;
       }



More information about the Kernel-svn-changes mailing list