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

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


Author: maks
Date: Mon Jul 27 12:16:21 2009
New Revision: 14031

Log:
postinst nuke undocumented move_image variable

didn't find that variable move_image documented
and just adds extra complexity.

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

Modified: dists/trunk/linux-2.6/debian/templates/temp.image.plain/config
==============================================================================
--- dists/trunk/linux-2.6/debian/templates/temp.image.plain/config	Mon Jul 27 12:16:03 2009	(r14030)
+++ dists/trunk/linux-2.6/debian/templates/temp.image.plain/config	Mon Jul 27 12:16:21 2009	(r14031)
@@ -25,7 +25,6 @@
 my $no_symlink        = "=S";   # Should be empty, mostly
 my $reverse_symlink   = "=R";   # Should be empty, mostly
 my $do_symlink        = "Yes";  # target machine defined
-my $move_image        = '';     # target machine defined
 my $kimage            = "=K";   # Should be empty, mostly
 my $image_dir         = "=D";        # where the image is located
 my $relative_links    = "";          # target machine defined
@@ -70,7 +69,6 @@
       $reverse_symlink = "" if /reverse_symlink\s*=\s*(no|false|0)\s*$/ig;
       $link_in_boot    = "" if /image_in_boot\s*=\s*(no|false|0)\s*$/ig;
       $link_in_boot    = "" if /link_in_boot\s*=\s*(no|false|0)\s*$/ig;
-      $move_image      = "" if /move_image\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;
       $minimal_swap    = '' if /minimal_swap\s*=\s*(no|false|0)\s*$/ig;
@@ -84,7 +82,6 @@
       $reverse_symlink = "Yes" if /reverse_symlinks\s*=\s*(yes|true|1)\s*$/ig;
       $link_in_boot    = "Yes" if /image_in_boot\s*=\s*(yes|true|1)\s*$/ig;
       $link_in_boot    = "Yes" if /link_in_boot\s*=\s*(yes|true|1)\s*$/ig;
-      $move_image      = "Yes" if /move_image\s*=\s*(yes|true|1)\s*$/ig;
       $relative_links  = "Yes" if /relative_links\s*=\s*(yes|true|1)\s*$/ig;
       $use_hard_links  = "Yes" if /use_hard_links\s*=\s*(yes|true|1)\s*$/ig;
       $minimal_swap    = 'Yes' if /minimal_swap\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	Mon Jul 27 12:16:03 2009	(r14030)
+++ dists/trunk/linux-2.6/debian/templates/temp.image.plain/postinst	Mon Jul 27 12:16:21 2009	(r14031)
@@ -32,7 +32,6 @@
 my $do_symlink        = "Yes";  # target machine defined
 my $do_boot_enable    = "Yes";  # target machine defined
 my $do_bootloader     = "Yes";  # target machine defined
-my $move_image        = '';     # target machine defined
 my $kimage            = "=K";   # Should be empty, mostly
 my $loader            = "=L"; # lilo, silo, quik, palo, vmelilo, nettrom, arcboot or delo
 my $image_dir         = "=D";        # where the image is located
@@ -109,7 +108,6 @@
       $no_symlink      = "" if /no_symlinks\s*=\s*(no|false|0)\s*$/ig;
       $reverse_symlink = "" if /reverse_symlink\s*=\s*(no|false|0)\s*$/ig;
       $link_in_boot    = "" if /link_in_boot\s*=\s*(no|false|0)\s*$/ig;
-      $move_image      = "" if /move_image\s*=\s*(no|false|0)\s*$/ig;
       $do_boot_enable  = '' if /do_boot_enable\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;
@@ -125,7 +123,6 @@
       $no_symlink      = "Yes" if /no_symlinks\s*=\s*(yes|true|1)\s*$/ig;
       $reverse_symlink = "Yes" if /reverse_symlinks\s*=\s*(yes|true|1)\s*$/ig;
       $link_in_boot    = "Yes" if /link_in_boot\s*=\s*(yes|true|1)\s*$/ig;
-      $move_image      = "Yes" if /move_image\s*=\s*(yes|true|1)\s*$/ig;
       $do_boot_enable  = "Yes" if /do_boot_enable\s*=\s*(yes|true|1)\s*$/ig;
       $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;
@@ -332,76 +329,6 @@
   }
   return join ('/', @outdir);
 }
-######################################################################
-######################################################################
-############
-######################################################################
-######################################################################
-
-
-# This routine actually moves the kernel image
-# From: $realimageloc/$kimage-$version (/boot/vmlinuz-2.6.12)
-# To:   $image_dest/$kimage-$version   (/vmlinuz-2.6.12)
-# Note that the image is moved to a versioned destination, but ordinary
-# symlinks we create otherwise are not normally versioned
-sub really_move_image {
-  my $src_dir  = $_[0];
-  my $target   = $_[1];
-  my $dest_dir = $_[2];
-
-  warn "Really move image: src_dir=$src_dir, target=$target,\n destdir=$dest_dir"
-    if $DEBUG;
-  if (-e "$target") {
-    # we should be in dir $dest_dir == $image_dest /, normally
-    rename("$target", "$target.$$") ||
-      die "failed to move " . $dest_dir . "$target:$!";
-  }
-  my $ret = system("mv -f " . $src_dir . "$target " .
-                   " $target");
-  if ($ret) {
-    die("Failed to move " . $src_dir . "$target to "
-        . $dest_dir . "$target.\n");
-  }
-  # Ok, now we may clobber the previous .old files
-  if (-e "$target.$$") {
-    rename("$target.$$", "$target.old") ||
-      die "failed to move " . $dest_dir . "$target:$!";
-  }
-}
-
-# Normally called after really_move_image; and only called if we asked for 
-# reversed link this routine reverses the symbolic link that is notmally 
-# created. Since the real kernel image has been moved over to 
-# $image_dest/$kimage-$version. So, this routine links
-# From:   $image_dest/$kimage-$version   (/vmlinuz-2.6.12)
-# To:     $realimageloc/$kimage-$version (/boot/vmlinuz-2.6.12)
-sub really_reverse_link {
-  my $src_dir    = $_[0];
-  my $link_name  = $_[1];
-  my $dest_dir   = $_[2];
-  warn "Really reverse link: src_dir=$src_dir, link name=$link_name\n" .
-    "\tdestdir=$dest_dir" if $DEBUG;
-
-  my $Old = $dest_dir;
-  if (test_relative ('Old Dir' => $Old, 'New Dir' => $src_dir,
-                     'Test File' => "$link_name")) {
-    $Old   =~ s|^/*||o;
-  }
-  # Special case is they are in the same dir
-  my $rel_path = spath('Old' => "$Old", 'New' => "$src_dir" );
-  $Old ="" if $rel_path =~ m/^\s*$/o;
-
-  if ($use_hard_links =~ m/YES/i) {
-    link($Old . "$link_name", $src_dir . "$link_name") ||
-      die("Failed to hard-link " . $dest_dir . "$link_name to " . $src_dir
-          . "$link_name .\n");
-  }
-  else {
-    symlink($Old . "$link_name", $src_dir . "$link_name") ||
-      die("Failed to symbolically link " . $dest_dir . "$link_name to " . $src_dir . 
-          "$link_name .\n");
-  }
-}
 
 # This routine is invoked if there is a symbolic link in place
 # in $image_dest/$kimage -- so a symlink exists in the destination.
@@ -761,14 +688,6 @@
   warn "image_magic: kimage=$kimage, image_dest=$image_dest\n" .
     "\t image_name=$image_name, src_dir=$src_dir" if $DEBUG;
 
-  if ($move_image) {   # Maybe $image_dest is in on dos, or something?
-    #                   source dir,    link name,        dest dir
-    really_move_image(  $realimageloc, $image_name, $image_dest);
-    really_reverse_link($realimageloc, $image_name, $image_dest)
-      if $reverse_symlink;
-    return;
-  }
-
   if (-l "$kimage") {           # There is a symbolic link
     warn "DEBUG: There is a symlink for $kimage\n" if $DEBUG;
     my $force_move = move_p($kimage, $image_dest, $image_name, $src_dir);

Modified: dists/trunk/linux-2.6/debian/templates/temp.image.plain/postrm
==============================================================================
--- dists/trunk/linux-2.6/debian/templates/temp.image.plain/postrm	Mon Jul 27 12:16:03 2009	(r14030)
+++ dists/trunk/linux-2.6/debian/templates/temp.image.plain/postrm	Mon Jul 27 12:16:21 2009	(r14031)
@@ -42,7 +42,6 @@
 my $do_symlink        = "Yes";	# target machine defined
 my $do_boot_enable    = "Yes";	# target machine defined
 my $do_bootloader     = "Yes";	# target machine defined
-my $move_image        = '';       # target machine defined
 my $kimage            = "=K";	# Should be empty, mostly
 my $loader            = "=L";     # lilo, silo, quik, palo, vmelilo, or nettrom
 my $image_dir         = "=D";     # where the image is located
@@ -110,7 +109,6 @@
       $no_symlink      = "" if /no_symlinks\s*=\s*(no|false|0)\s*$/ig;
       $reverse_symlink = "" if /reverse_symlinks\s*=\s*(no|false|0)\s*$/ig;
       $link_in_boot    = "" if /link_in_boot\s*=\s*(no|false|0)\s*$/ig;
-      $move_image      = "" if /move_image\s*=\s*(no|false|0)\s*$/ig;
       $do_boot_enable  = '' if /do_boot_enable\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;
@@ -125,7 +123,6 @@
       $no_symlink      = "Yes" if /no_symlinks\s*=\s*(yes|true|1)\s*$/ig;
       $reverse_symlink = "Yes" if /reverse_symlinks\s*=\s*(yes|true|1)\s*$/ig;
       $link_in_boot    = "Yes" if /link_in_boot\s*=\s*(yes|true|1)\s*$/ig;
-      $move_image      = "Yes" if /move_image\s*=\s*(yes|true|1)\s*$/ig;
       $do_boot_enable  = "Yes" if /do_boot_enable\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;

Modified: dists/trunk/linux-2.6/debian/templates/temp.image.plain/preinst
==============================================================================
--- dists/trunk/linux-2.6/debian/templates/temp.image.plain/preinst	Mon Jul 27 12:16:03 2009	(r14030)
+++ dists/trunk/linux-2.6/debian/templates/temp.image.plain/preinst	Mon Jul 27 12:16:21 2009	(r14031)
@@ -29,7 +29,6 @@
 my $no_symlink      = "=S";     # Should be empty, mostly
 my $reverse_symlink = "=R";     # Should be empty, mostly
 my $do_symlink      = "Yes";	# target machine defined
-my $move_image      = '';       # target machine defined
 my $kimage          = "=K";     # Should be empty, mostly
 my $image_dir       = "=D";     # where the image is located
 my $use_hard_links  = '';       # hardlinks do not wirk across fs boundaries
@@ -87,7 +86,6 @@
       $no_symlink      = "" if /no_symlinks\s*=\s*(no|false|0)\s*$/ig;
       $reverse_symlink = "" if /reverse_symlinks\s*=\s*(no|false|0)\s*$/ig;
       $link_in_boot    = "" if /link_in_boot\s*=\s*(no|false|0)\s*$/ig;
-      $move_image      = "" if /move_image\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;
       $minimal_swap    = '' if /minimal_swap\s*=\s*(no|false|0)\s*$/ig;
@@ -100,7 +98,6 @@
       $no_symlink      = "Yes" if /no_symlinks\s*=\s*(yes|true|1)\s*$/ig;
       $reverse_symlink = "Yes" if /reverse_symlinks\s*=\s*(yes|true|1)\s*$/ig;
       $link_in_boot    = "Yes" if /link_in_boot\s*=\s*(yes|true|1)\s*$/ig;
-      $move_image      = "Yes" if /move_image\s*=\s*(yes|true|1)\s*$/ig;
       $relative_links  = "Yes" if /relative_links\s*=\s*(yes|true|1)\s*$/ig;
       $use_hard_links  = "Yes" if /use_hard_links\s*=\s*(yes|true|1)\s*$/ig;
       $minimal_swap    = 'Yes' if /minimal_swap\s*=\s*(yes|true|1)\s*$/ig;

Modified: dists/trunk/linux-2.6/debian/templates/temp.image.plain/prerm
==============================================================================
--- dists/trunk/linux-2.6/debian/templates/temp.image.plain/prerm	Mon Jul 27 12:16:03 2009	(r14030)
+++ dists/trunk/linux-2.6/debian/templates/temp.image.plain/prerm	Mon Jul 27 12:16:21 2009	(r14031)
@@ -30,7 +30,6 @@
 my $do_symlinks     = "Yes";	# target machine defined
 my $do_boot_enable  = "Yes";	# target machine defined
 my $do_bootloader   = "Yes";	# target machine defined
-my $move_image      = '';       # target machine defined
 my $kimage          = "=K";	# Should be empty, mostly
 my $loader          = "=L";     # lilo, silo, quik, palo, vmelilo, or nettrom
 my $image_dir       = "=D";     # where the image is located
@@ -110,7 +109,6 @@
       $no_symlink      = "" if /no_symlinks\s*=\s*(no|false|0)\s*$/ig;
       $reverse_symlink = "" if /reverse_symlinks\s*=\s*(no|false|0)\s*$/ig;
       $link_in_boot    = "" if /link_in_boot\s*=\s*(no|false|0)\s*$/ig;
-      $move_image      = "" if /move_image\s*=\s*(no|false|0)\s*$/ig;
       $do_boot_enable  = '' if /do_boot_enable\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;
@@ -127,7 +125,6 @@
       $no_symlink      = "Yes" if /no_symlinks\s*=\s*(yes|true|1)\s*$/ig;
       $reverse_symlink = "Yes" if /reverse_symlinks\s*=\s*(yes|true|1)\s*$/ig;
       $link_in_boot    = "Yes" if /link_in_boot\s*=\s*(yes|true|1)\s*$/ig;
-      $move_image      = "Yes" if /move_image\s*=\s*(yes|true|1)\s*$/ig;
       $do_boot_enable  = "Yes" if /do_boot_enable\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;



More information about the Kernel-svn-changes mailing list