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

Maximilian Attems maks at alioth.debian.org
Mon Jul 27 12:12:14 UTC 2009


Author: maks
Date: Mon Jul 27 12:12:07 2009
New Revision: 14014

Log:
preinst don't check against do_initrd setting

initramfs is the default and user shouldn't be prompted for it.
nukes thus some useless templates.

also nuke do_initrd and warn_initrd variables all over the places.

Modified:
   dists/trunk/linux-2.6/debian/templates/temp.image.plain/config
   dists/trunk/linux-2.6/debian/templates/temp.image.plain/postinst
   dists/trunk/linux-2.6/debian/templates/temp.image.plain/postrm
   dists/trunk/linux-2.6/debian/templates/temp.image.plain/preinst
   dists/trunk/linux-2.6/debian/templates/temp.image.plain/prerm
   dists/trunk/linux-2.6/debian/templates/temp.image.plain/templates

Modified: dists/trunk/linux-2.6/debian/templates/temp.image.plain/config
==============================================================================
--- dists/trunk/linux-2.6/debian/templates/temp.image.plain/config	Sun Jul 26 14:20:38 2009	(r14013)
+++ dists/trunk/linux-2.6/debian/templates/temp.image.plain/config	Mon Jul 27 12:12:07 2009	(r14014)
@@ -36,8 +36,6 @@
 my $relative_links    = "";          # target machine defined
 my $initrd            = "=I";        # initrd kernel
 my $mkimage           = "=M";   # command to generate the initrd image
-my $do_initrd         = '';     # Normally we do not
-my $warn_initrd       = 'YES';  # Normally we do
 my $use_hard_links    = ''; # hardlinks do not work across fs boundaries
 my $postinst_hook     = '';          #Normally we do not
 my $postrm_hook       = '';          #Normally we do not
@@ -103,8 +101,6 @@
       $do_bootfloppy   = '' if /do_bootfloppy\s*=\s*(no|false|0)\s*$/ig;
       $relative_links  = '' if /relative_links \s*=\s*(no|false|0)\s*$/ig;
       $do_bootloader   = '' if /do_bootloader\s*=\s*(no|false|0)\s*$/ig;
-      $do_initrd       = '' if /do_initrd\s*=\s*(no|false|0)\s*$/ig;
-      $warn_initrd     = '' if /warn_initrd\s*=\s*(no|false|0)\s*$/ig;
       $use_hard_links  = '' if /use_hard_links\s*=\s*(no|false|0)\s*$/ig;
       $silent_modules  = '' if /silent_modules\s*=\s*(no|false|0)\s*$/ig;
       $silent_loader   = '' if /silent_loader\s*=\s*(no|false|0)\s*$/ig;
@@ -125,8 +121,6 @@
       $do_bootfloppy   = "Yes" if /do_bootfloppy\s*=\s*(yes|true|1)\s*$/ig;
       $do_bootloader   = "Yes" if /do_bootloader\s*=\s*(yes|true|1)\s*$/ig;
       $relative_links  = "Yes" if /relative_links\s*=\s*(yes|true|1)\s*$/ig;
-      $do_initrd       = "Yes" if /do_initrd\s*=\s*(yes|true|1)\s*$/ig;
-      $warn_initrd     = "Yes" if /warn_initrd\s*=\s*(yes|true|1)\s*$/ig;
       $use_hard_links  = "Yes" if /use_hard_links\s*=\s*(yes|true|1)\s*$/ig;
       $silent_modules  = 'Yes' if /silent_modules\s*=\s*(yes|true|1)\s*$/ig;
       $silent_loader   = 'Yes' if /silent_loader\s*=\s*(yes|true|1)\s*$/ig;

Modified: dists/trunk/linux-2.6/debian/templates/temp.image.plain/postinst
==============================================================================
--- dists/trunk/linux-2.6/debian/templates/temp.image.plain/postinst	Sun Jul 26 14:20:38 2009	(r14013)
+++ dists/trunk/linux-2.6/debian/templates/temp.image.plain/postinst	Mon Jul 27 12:12:07 2009	(r14014)
@@ -41,8 +41,6 @@
 my $relative_links    = "";          # target machine defined
 my $initrd            = "=I";        # initrd kernel
 my $mkimage           = "=M";   # command to generate the initrd image
-my $do_initrd         = '';     # Normally we do not
-my $warn_initrd       = 'YES';  # Normally we do
 my $use_hard_links    = ''; # hardlinks do not work across fs boundaries
 my $postinst_hook     = '';          #Normally we do not
 my $postrm_hook       = '';          #Normally we do not
@@ -121,8 +119,6 @@
       $do_bootfloppy   = '' if /do_bootfloppy\s*=\s*(no|false|0)\s*$/ig;
       $relative_links  = '' if /relative_links \s*=\s*(no|false|0)\s*$/ig;
       $do_bootloader   = '' if /do_bootloader\s*=\s*(no|false|0)\s*$/ig;
-      $do_initrd       = '' if /do_initrd\s*=\s*(no|false|0)\s*$/ig;
-      $warn_initrd     = '' if /warn_initrd\s*=\s*(no|false|0)\s*$/ig;
       $use_hard_links  = '' if /use_hard_links\s*=\s*(no|false|0)\s*$/ig;
       $silent_modules  = '' if /silent_modules\s*=\s*(no|false|0)\s*$/ig;
       $silent_loader   = '' if /silent_loader\s*=\s*(no|false|0)\s*$/ig;
@@ -143,8 +139,6 @@
       $do_bootloader   = "Yes" if /do_bootloader\s*=\s*(yes|true|1)\s*$/ig;
       $explicit_do_loader = "YES" if /do_bootloader\s*=\s*(yes|true|1)\s*$/ig;
       $relative_links  = "Yes" if /relative_links\s*=\s*(yes|true|1)\s*$/ig;
-      $do_initrd       = "Yes" if /do_initrd\s*=\s*(yes|true|1)\s*$/ig;
-      $warn_initrd     = "Yes" if /warn_initrd\s*=\s*(yes|true|1)\s*$/ig;
       $use_hard_links  = "Yes" if /use_hard_links\s*=\s*(yes|true|1)\s*$/ig;
       $silent_modules  = 'Yes' if /silent_modules\s*=\s*(yes|true|1)\s*$/ig;
       $silent_loader   = 'Yes' if /silent_loader\s*=\s*(yes|true|1)\s*$/ig;

Modified: dists/trunk/linux-2.6/debian/templates/temp.image.plain/postrm
==============================================================================
--- dists/trunk/linux-2.6/debian/templates/temp.image.plain/postrm	Sun Jul 26 14:20:38 2009	(r14013)
+++ dists/trunk/linux-2.6/debian/templates/temp.image.plain/postrm	Mon Jul 27 12:12:07 2009	(r14014)
@@ -50,8 +50,6 @@
 my $clobber_modules   = '';       # target machine defined
 my $initrd            = "=I";     # initrd kernel
 my $mkimage           = "=M";        # command to generate the initrd image
-my $do_initrd         = '';       # Normally, we don't
-my $warn_initrd       = 'YES';    # Normally we do
 my $use_hard_links    = '';       # hardlinks do not work across fs boundaries
 my $postinst_hook     = '';       #Normally we do not
 my $postrm_hook       = '';       #Normally we do not
@@ -124,8 +122,6 @@
       $do_bootfloppy   = '' if /do_bootfloppy\s*=\s*(no|false|0)\s*$/ig;
       $relative_links  = '' if /relative_links \s*=\s*(no|false|0)\s*$/ig;
       $do_bootloader   = '' if /do_bootloader\s*=\s*(no|false|0)\s*$/ig;
-      $do_initrd       = '' if /do_initrd\s*=\s*(no|false|0)\s*$/ig;
-      $warn_initrd     = '' if /warn_initrd\s*=\s*(no|false|0)\s*$/ig;
       $use_hard_links  = '' if /use_hard_links\s*=\s*(no|false|0)\s*$/ig;
       $silent_modules  = '' if /silent_modules\s*=\s*(no|false|0)\s*$/ig;
       $silent_loader   = '' if /silent_loader\s*=\s*(no|false|0)\s*$/ig;
@@ -144,8 +140,6 @@
       $do_bootfloppy   = "Yes" if /do_bootfloppy\s*=\s*(yes|true|1)\s*$/ig;
       $do_bootloader   = "Yes" if /do_bootloader\s*=\s*(yes|true|1)\s*$/ig;
       $relative_links  = "Yes" if /relative_links\s*=\s*(yes|true|1)\s*$/ig;
-      $do_initrd       = "Yes" if /do_initrd\s*=\s*(yes|true|1)\s*$/ig;
-      $warn_initrd     = "Yes" if /warn_initrd\s*=\s*(yes|true|1)\s*$/ig;
       $use_hard_links  = "Yes" if /use_hard_links\s*=\s*(yes|true|1)\s*$/ig;
       $silent_modules  = 'Yes' if /silent_modules\s*=\s*(yes|true|1)\s*$/ig;
       $silent_loader   = 'Yes' if /silent_loader\s*=\s*(yes|true|1)\s*$/ig;

Modified: dists/trunk/linux-2.6/debian/templates/temp.image.plain/preinst
==============================================================================
--- dists/trunk/linux-2.6/debian/templates/temp.image.plain/preinst	Sun Jul 26 14:20:38 2009	(r14013)
+++ dists/trunk/linux-2.6/debian/templates/temp.image.plain/preinst	Mon Jul 27 12:12:07 2009	(r14014)
@@ -34,8 +34,6 @@
 my $do_bootloader   = "Yes";	# target machine defined
 my $move_image      = '';       # target machine defined
 my $mkimage         = "=M";     # command to generate the initrd image
-my $do_initrd       = '';       # target machine defined
-my $warn_initrd     = 'YES';    # target machine defined
 my $kimage          = "=K";     # Should be empty, mostly
 my $loader          = "=L";     # lilo, silo, quik, palo, vmelilo, nettrom
                                 # or elilo
@@ -121,8 +119,6 @@
       $do_boot_enable  = '' if /do_boot_enable\s*=\s*(no|false|0)\s*$/ig;
       $do_bootfloppy   = '' if /do_bootfloppy\s*=\s*(no|false|0)\s*$/ig;
       $do_bootloader   = '' if /do_bootloader\s*=\s*(no|false|0)\s*$/ig;
-      $do_initrd       = '' if /do_initrd\s*=\s*(no|false|0)\s*$/ig;
-      $warn_initrd     = '' if /warn_initrd\s*=\s*(no|false|0)\s*$/ig;
       $relative_links  = '' if /relative_links \s*=\s*(no|false|0)\s*$/ig;
       $use_hard_links  = '' if /use_hard_links\s*=\s*(no|false|0)\s*$/ig;
       $silent_modules  = '' if /silent_modules\s*=\s*(no|false|0)\s*$/ig;
@@ -143,8 +139,6 @@
       $do_bootfloppy   = "Yes" if /do_bootfloppy\s*=\s*(yes|true|1)\s*$/ig;
       $do_bootloader   = "Yes" if /do_bootloader\s*=\s*(yes|true|1)\s*$/ig;
       $relative_links  = "Yes" if /relative_links\s*=\s*(yes|true|1)\s*$/ig;
-      $do_initrd       = "Yes" if /do_initrd\s*=\s*(yes|true|1)\s*$/ig;
-      $warn_initrd     = "Yes" if /warn_initrd\s*=\s*(yes|true|1)\s*$/ig;
       $use_hard_links  = "Yes" if /use_hard_links\s*=\s*(yes|true|1)\s*$/ig;
       $silent_modules  = 'Yes' if /silent_modules\s*=\s*(yes|true|1)\s*$/ig;
       $silent_loader   = 'Yes' if /silent_loader\s*=\s*(yes|true|1)\s*$/ig;
@@ -168,9 +162,6 @@
   }
 }
 
-if ($do_initrd)    {   $warn_initrd = '';   }
-if (!$warn_initrd) {   $do_initrd   = "YES";}
-
 $ENV{KERNEL_ARCH}=$kernel_arch if $kernel_arch;
 
 # About to upgrade this package from version $2 TO THIS VERSION.
@@ -232,91 +223,6 @@
 }
 
 
-if ($initrd && !$do_initrd) {
-  my $ret;
-  my $seen;
-  my $answer;
-  my $invisible = 0;
-  my $question = "${package_name}/preinst/bootloader-initrd-$version";
-  if ($loader =~ m/^lilo/i) {
-    $question = "${package_name}/preinst/lilo-initrd-$version";
-  }
-  elsif ($loader =~ m/^elilo/i) {
-    $question = "${package_name}/preinst/elilo-initrd-$version";
-  }
-  ($ret,$seen) = fset ("$question", 'seen', 'false');
-  die "Error setting debconf flags in $question: $seen" if $ret;
-
-  ($ret,$seen) = input('critical', "$question");
-  if ($ret && $ret != 30 ) {
-    die "Error setting debconf question $question: $seen";
-  }
-  $invisible = $ret if $ret == 30;
-
-  ($ret,$seen) = go ();
-  if ($ret && $ret != 30 ) {
-    die "Error asking debconf question $question: $seen";
-  }
-
-  ($ret,$answer) = get("$question");
-  die "Error retreiving answer for $question: $answer" if $ret;
-
-  my $note = "${package_name}/preinst/lilo-has-ramdisk";
-  if (-f "/etc/lilo.conf"){
-    my $ramdisk_found = 0;
-    open (CONF, "/etc/lilo.conf")  or warn "Can't open /etc/lilo.conf: $!";
-    while (<CONF>) {
-      chomp;
-      if (m/^(\s*ramdisk\s*=\s*0)/g) {
-        my $line = $1;
-
-        ($ret,$seen) = fset ("$note", 'seen', 'false');
-        die "Error setting debconf flags in $note: $seen" if $ret;
-
-        $ret = subst("$note", 'LINE', "$line");
-        die "Error setting debconf substitutions in $note: $seen" if $ret;
-
-        ($ret,$seen) = input('medium', "$note");
-        if ($ret && $ret != 30 ) {
-          die "Error setting debconf note $note: $seen";
-        }
-
-        ($ret,$seen) = go ();
-        if ($ret && $ret != 30 ) {
-          die "Error asking debconf question $note: $seen";
-        }
-        last;
-      }
-    }
-    close CONF;
-  }
-  $answer =~ s/^\s+//;
-  $answer =~ s/\s+$//;
-  print STDERR "Ok, Aborting, since the bootloader might not handle " .
-    "an initrd/initramfs image.\n" unless $answer =~ /^(f|n)/i;
-  if ($answer !~ /^(f|n)/i && $invisible) {
-    my $note = "${package_name}/preinst/abort-install-$version";
-
-    ($ret,$seen) = fset ("$note", 'seen', 'false');
-    die "Error setting debconf flags in $note: $seen" if $ret;
-
-    ($ret,$seen) = fset ("$note", 'seen', 'false');
-    die "Error setting debconf flags in $note: $seen" if $ret;
-
-    ($ret,$seen) = input('critical', "$note");
-    if ($ret && $ret != 30 ) {
-      die "Error setting debconf note $note: $seen";
-    }
-
-    ($ret,$seen) = go ();
-    if ($ret && $ret != 30 ) {
-      die "Error asking debconf question $note: $seen";
-    }
-  }
-  exit 1 unless  $answer =~ /^(f|n)/i;
-}
-
-
 sub check {
   my $version = shift;
   my $lib_modules="$modules_base/$version";

Modified: dists/trunk/linux-2.6/debian/templates/temp.image.plain/prerm
==============================================================================
--- dists/trunk/linux-2.6/debian/templates/temp.image.plain/prerm	Sun Jul 26 14:20:38 2009	(r14013)
+++ dists/trunk/linux-2.6/debian/templates/temp.image.plain/prerm	Mon Jul 27 12:12:07 2009	(r14014)
@@ -125,7 +125,6 @@
       $do_bootfloppy   = '' if /do_bootfloppy\s*=\s*(no|false|0)\s*$/ig;
       $relative_links  = '' if /relative_links \s*=\s*(no|false|0)\s*$/ig;
       $do_bootloader   = '' if /do_bootloader\s*=\s*(no|false|0)\s*$/ig;
-      $do_initrd       = '' if /do_initrd\s*=\s*(no|false|0)\s*$/ig;
       $use_hard_links  = '' if /use_hard_links\s*=\s*(no|false|0)\s*$/ig;
       $silent_modules  = '' if /silent_modules\s*=\s*(no|false|0)\s*$/ig;
       $silent_loader   = '' if /silent_loader\s*=\s*(no|false|0)\s*$/ig;
@@ -146,7 +145,6 @@
       $do_bootfloppy   = "Yes" if /do_bootfloppy\s*=\s*(yes|true|1)\s*$/ig;
       $do_bootloader   = "Yes" if /do_bootloader\s*=\s*(yes|true|1)\s*$/ig;
       $relative_links  = "Yes" if /relative_links\s*=\s*(yes|true|1)\s*$/ig;
-      $do_initrd       = "Yes" if /do_initrd\s*=\s*(yes|true|1)\s*$/ig;
       $use_hard_links  = "Yes" if /use_hard_links\s*=\s*(yes|true|1)\s*$/ig;
       $silent_modules  = 'Yes' if /silent_modules\s*=\s*(yes|true|1)\s*$/ig;
       $silent_loader   = 'Yes' if /silent_loader\s*=\s*(yes|true|1)\s*$/ig;

Modified: dists/trunk/linux-2.6/debian/templates/temp.image.plain/templates
==============================================================================
--- dists/trunk/linux-2.6/debian/templates/temp.image.plain/templates	Sun Jul 26 14:20:38 2009	(r14013)
+++ dists/trunk/linux-2.6/debian/templates/temp.image.plain/templates	Mon Jul 27 12:12:07 2009	(r14014)
@@ -12,86 +12,6 @@
  .
  ${initrddep}
 
-Template: =ST-image-=V/preinst/bootloader-initrd-=V
-Type: boolean
-Default: true
-Description: Abort initrd kernel image installation?
- You are attempting to install an initrd kernel image (version =V).
- This will not work unless the boot loader is configured to use an
- initrd.
- .
- An initrd image is a kernel image that expects to use an INITial
- Ram Disk to mount a minimal root file system into RAM and use that for
- booting.
- .
- The boot loader must be configured to use such images and the system will not
- boot until this is done.
- .
- This message will appear for any new kernel installation unless the
- following is added to /etc/kernel-img.conf:
- .
- "do_initrd = Yes"
-
-Template: =ST-image-=V/preinst/lilo-initrd-=V
-Type: boolean
-Default: true
-Description: Abort initrd kernel image installation?
- You are attempting to install an initrd kernel image (version =V).
- This will not work unless the boot loader is configured to use an
- initrd.
- .
- In order to configure LILO, you need to add
- 'initrd=/initrd.img' to the image=/vmlinuz stanza of /etc/lilo.conf.
- .
- The boot loader must be configured to use such images and the system will not
- boot until this is done.
- .
- This message will appear for any new kernel installation unless the
- following is added to /etc/kernel-img.conf:
- .
- "do_initrd = Yes"
-
-Template: =ST-image-=V/preinst/elilo-initrd-=V
-Type: boolean
-Default: true
-Description: Abort initrd kernel image installation?
- You are attempting to install an initrd kernel image (version =V).
- This will not work unless the boot loader is configured to use an
- initrd.
- .
- In order to configure LILO, you need to add
- 'initrd=/initrd.img' to the image=/vmlinuz stanza of /etc/elilo.conf.
- .
- The boot loader must be configured to use such images and the system will not
- boot until this is done.
- .
- This message will appear for any new kernel installation unless the
- following is added to /etc/kernel-img.conf:
- .
- "do_initrd = Yes"
-
-Template: =ST-image-=V/preinst/lilo-has-ramdisk
-Type: text
-Description: Removal of 'ramdisk' in /etc/lilo.conf
- The following line in /etc/lilo.conf should be removed or commented out,
- since the system uses initrd (or initramfs):
- .
- ${LINE}
-
-Template: =ST-image-=V/preinst/abort-install-=V
-Type: note
-Description: Aborting install of unsupported initrd kernel image
- You are attempting to install an initrd kernel image (version =V).
- This will not work unless the boot loader is configured to use an
- initrd.
- .
- An initrd image is a kernel image that expects to use an INITial
- Ram Disk to mount a minimal root file system into RAM and use that for
- booting.
- .
- As the question that's relevant for this situation
- was not shown, =ST-image-=V installation has been aborted.
-
 Template: =ST-image-=V/preinst/failed-to-move-modules-=V
 Type: note
 Description: Modules removal failure



More information about the Kernel-svn-changes mailing list