Help!

piupart failure on preinst

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Kernel RSS
Next:  Accepted binutils 2.19.51.20090723-1 (source all ..  
Author Message
maximilian attems
External


Since: Feb 19, 2007
Posts: 201



PostPosted: Thu Jul 23, 2009 7:10 am    Post subject: piupart failure on preinst
Archived from groups: linux>debian>kernel (more info?)

the k-p legacy code seems to assume that bootloaders have
no initrd/initramfs support:
http://piuparts.debian.org/sid/fail/linux-image-2.6.30-1-amd64_2.6.30-3.log

i propose to nuke that hole section,
as any recent (e)lilo.conf has an initrd support.
also any recent bootloader must just support initrd/initramfs.

as bonus linux-2.6 images are easily installed in chroots
without stupid do_initrd set in /etc/kernel-img.conf
also gets rid of 4 ambigous debconf templates.

--
maks

proposed patch with ETA next week monday

diff --git a/linux-2.6/debian/templates/temp.image.plain/preinst b/linux-2.6/debian/templates/temp.image.plain/preinst
index f7f9184..2774e42 100755
--- a/linux-2.6/debian/templates/temp.image.plain/preinst
+++ b/linux-2.6/debian/templates/temp.image.plain/preinst
@@ -34,8 +34,6 @@ my $do_bootfloppy = "Yes"; # target machine defined
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 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
$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 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
$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 (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
}
}

-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) {
}


-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";
diff --git a/linux-2.6/debian/templates/temp.image.plain/templates b/linux-2.6/debian/templates/temp.image.plain/templates
index c34d00f..f9a747e 100644
--- a/linux-2.6/debian/templates/temp.image.plain/templates
+++ b/linux-2.6/debian/templates/temp.image.plain/templates
@@ -12,86 +12,6 @@ Description: Initial RAMdisk image generation impossible
.
${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


--
To UNSUBSCRIBE, email to debian-kernel-REQUEST.RemoveThis@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.RemoveThis@lists.debian.org
Back to top
maximilian attems
External


Since: Feb 19, 2007
Posts: 201



PostPosted: Thu Jul 23, 2009 8:10 am    Post subject: Re: piupart failure on preinst [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Thu, 23 Jul 2009, maximilian attems wrote:

> as bonus linux-2.6 images are easily installed in chroots
> without stupid do_initrd set in /etc/kernel-img.conf
> also gets rid of 4 ambigous debconf templates.
>

as follow up the old-initrd-link template and friends seems also quite aged,
will axe too. we shouldn't care anymore about that legacy.


diff --git a/linux-2.6/debian/templates/temp.image.plain/config b/linux-2.6/debian/templates/temp.image.plain/config
index f9e1494..f04f58f 100755
--- a/linux-2.6/debian/templates/temp.image.plain/config
+++ b/linux-2.6/debian/templates/temp.image.plain/config
@@ -222,63 +222,6 @@ if (! -e "$kimage" && ! $no_symlink && ! $reverse_symlink &&
}
}

-if ($initrd && -l "$image_dest/initrd" ) {
- my $ret;
- my $seen;
- my $question = "${package_name}/postinst/old-initrd-link-$version";
-
- ($ret,$seen) = input('medium', "$question");
- if ($ret && $ret != 30 ) {
- die "Error setting debconf question $question: $seen";
- }
-
- ($ret,$seen) = go ();
- if ($ret && $ret != 30 ) {
- die "Error asking debconf question $question: $seen";
- }
-}
-
-if ($initrd && -l "$image_dir/initrd" && ! $link_in_boot) {
- my $ret;
- my $seen;
- my $question = "${package_name}/postinst/old-dir-initrd-link-$version";
-
- $ret = subst("$question", 'image_dir', "$image_dir");
- die "Error setting debconf substitutions in $question: $seen" if $ret;
-
- $ret = subst("$question", 'image_dest', "$image_dest");
- die "Error setting debconf substitutions in $question: $seen" if $ret;
-
- ($ret,$seen) = input('medium', "$question");
- if ($ret && $ret != 30 ) {
- die "Error setting debconf question $question: $seen";
- }
-
- ($ret,$seen) = go ();
- if ($ret && $ret != 30 ) {
- die "Error asking debconf question $question: $seen";
- }
-}
-
-
-# We used to have System.* files in /
-if (-e "/System.map" || -e "/System.old") {
- my $ret;
- my $seen;
- my $question = "${package_name}/postinst/old-dir-initrd-link-$version";
-
- ($ret,$seen) = input('medium', "$question");
- if ($ret && $ret != 30 ) {
- die "Error setting debconf question $question: $seen";
- }
-
- ($ret,$seen) = go ();
- if ($ret && $ret != 30 ) {
- die "Error asking debconf question $question: $seen";
- }
-}
-
-
exit 0;

__END__
diff --git a/linux-2.6/debian/templates/temp.image.plain/templates b/linux-2.6/debian/templates/temp.image.plain/templates
index f9a747e..8b88ae0 100644
--- a/linux-2.6/debian/templates/temp.image.plain/templates
+++ b/linux-2.6/debian/templates/temp.image.plain/templates
@@ -105,39 +105,6 @@ Description: Abort installation after depmod error?
modules.dep file. If you don't abort the installation, there is
a danger that the system will fail to boot.

-Template: =ST-image-=V/postinst/old-initrd-link-=V
-Type: boolean
-Default: true
-Description: Should the old initrd link be deleted now?
- There is an old initrd symbolic link in place. The name of
- the symbolic link is being changed to initrd.img. If the old link is
- deleted, you may have to update the boot loader. If the link is left in
- place, it will point to the wrong image.
-
-Template: =ST-image-=V/postinst/old-dir-initrd-link-=V
-Type: boolean
-Default: true
-Description: Should the old initrd link be deleted now?
- There is an old ${image_dir}/initrd symbolic link in
- place. The location of the symbolic link is now the same location as
- the kernel image symbolic links, in ${image_dest}. If the old
- link is deleted, you may have to update the boot loader. If the link
- is left in place, it will point to the wrong image.
-
-Template: =ST-image-=V/postinst/old-system-map-link-=V
-Type: boolean
-Default: true
-Description: Should the old /System.map link be deleted now?
- There is a /System.map symbolic link. Such links were installed by ancient
- kernel image packages.
- .
- However, all the programs that look at the
- information in the map files (including top, ps, and klogd)
- will also look at /boot/System.map-=V.
- .
- Some programs may however give priority to /System.map and it
- is therefore recommended to delete that link.
-
Template: shared/kernel-image/really-run-bootloader
Type: boolean
Default: true


--
To UNSUBSCRIBE, email to debian-kernel-REQUEST.DeleteThis@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.DeleteThis@lists.debian.org
Back to top
maximilian attems
External


Since: Feb 19, 2007
Posts: 201



PostPosted: Fri Jul 24, 2009 12:10 pm    Post subject: Re: piupart failure on preinst [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Thu, 23 Jul 2009, maximilian attems wrote:

> On Thu, 23 Jul 2009, maximilian attems wrote:
>
> > as bonus linux-2.6 images are easily installed in chroots
> > without stupid do_initrd set in /etc/kernel-img.conf
> > also gets rid of 4 ambigous debconf templates.
> >
>
> as follow up the old-initrd-link template and friends seems also quite aged,
> will axe too. we shouldn't care anymore about that legacy.
>

while doing more little cleanup i came to another bigger one,
that seems also very aged, when according to Manoj initrd,
where put into /initrd.

so ready to be axed too, see below:


diff --git a/linux-2.6/debian/templates/temp.image.plain/config b/linux-2.6/debian/templates/temp.image.plain/config
index ad0ac8d..0c7f30d 100755
--- a/linux-2.6/debian/templates/temp.image.plain/config
+++ b/linux-2.6/debian/templates/temp.image.plain/config
@@ -122,31 +122,6 @@ elsif ($kimage =~ m/^[iI]mage$/o) { my $nop = $kimage; }
elsif ($kimage =~ m/^vmlinux$/o) { my $nop = $kimage; }
else { $kimage = "vmlinuz"; } # Default

-if (-d "$kimage" ) {
- my $ret;
- my $seen;
- my $note = "${package_name}/postinst/kimage-is-a-directory";
-
- ($ret,$seen) = fset ("$note", 'seen', 'false');
- die "Error setting debconf flags in $note: $seen" if $ret;
-
- $ret = subst("$note", 'kimage', "$kimage");
- die "Error setting debconf substitutions in $note: $seen" if $ret;
-
- $ret = subst("$note", 'image_dest', "$image_dest");
- die "Error setting debconf substitutions 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";
- }
-}
-
if (! -e "$kimage" && ! $no_symlink && ! $reverse_symlink &&
! $have_conffile ) {
my $ret;
diff --git a/linux-2.6/debian/templates/temp.image.plain/postinst b/linux-2.6/debian/templates/temp.image.plain/postinst
index 6508d60..8cd0c6f 100755
--- a/linux-2.6/debian/templates/temp.image.plain/postinst
+++ b/linux-2.6/debian/templates/temp.image.plain/postinst
@@ -767,17 +767,6 @@ sub image_magic {
warn "image_magic: kimage=$kimage, image_dest=$image_dest\n" .
"\t image_name=$image_name, src_dir=$src_dir" if $DEBUG;

- # Well, in any case, if the destination (the symlink we are trying
- # to create) is a directory, we should do nothing, except throw a
- # diagnostic.
- if (-d "$kimage" ) {
- die ("Hmm. $kimage is a directory, which I did not expect. I am\n" .
- "trying to create a symbolic link with that name linked to \n" .
- "$image_dest . Since a directory exists here, my assumptions \n" .
- "are way off, and I am aborting.\n" );
- exit (3);
- }
-
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);
diff --git a/linux-2.6/debian/templates/temp.image.plain/templates b/linux-2.6/debian/templates/temp.image.plain/templates
index 502332a..8c75f45 100644
--- a/linux-2.6/debian/templates/temp.image.plain/templates
+++ b/linux-2.6/debian/templates/temp.image.plain/templates
@@ -71,13 +71,6 @@ Description: Create a symbolic link to the current kernel image?
installed image packages. This will be useful with some boot loaders
such as LILO.

-Template: =ST-image-=V/postinst/kimage-is-a-directory
-Type: note
-Description: Image symbolic link destination is a directory, aborting
- ${kimage} is a directory, which is unepected. There is no method to
- handle that situation automatically and the kernel image
- installation has been aborted.
-
Template: =ST-image-=V/postinst/depmod-error-initrd-=V
Type: boolean
Default: false


--
To UNSUBSCRIBE, email to debian-kernel-REQUEST.RemoveThis@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.RemoveThis@lists.debian.org
Back to top
maximilian attems
External


Since: Feb 19, 2007
Posts: 201



PostPosted: Sat Jul 25, 2009 11:10 am    Post subject: Re: piupart failure on preinst [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

on the topic of removing useless code in Maintainer scripts,
the official linux-2.6 images want to always update
/linux/module/${version} dir so we can also drop related code
of not doing so and related templates:


diff --git a/linux-2.6/debian/templates/temp.image.plain/postinst b/linux-2.6/debian/templates/temp.image.plain/postinst
index 4508376..ceb0b48 100755
--- a/linux-2.6/debian/templates/temp.image.plain/postinst
+++ b/linux-2.6/debian/templates/temp.image.plain/postinst
@@ -36,7 +36,6 @@ 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
-my $clobber_modules = ''; # target machine defined
my $relative_links = ""; # target machine defined
my $mkimage = "=M"; # command to generate the initrd image
my $use_hard_links = ''; # hardlinks do not work across fs boundaries
@@ -77,7 +76,6 @@ my $temp_file_name = "/var/log/$loader" . "_log.$$";
my $image_dest = "/";
my $realimageloc = "/$image_dir/";
my $have_conffile = "";
-my $silent_modules = '';
my $silent_loader = '';

my $modules_base = '/lib/modules';
@@ -112,12 +110,10 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
$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;
- $clobber_modules = '' if /clobber_modules\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;
$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;
$minimal_swap = '' if /minimal_swap\s*=\s*(no|false|0)\s*$/ig;
$ignore_depmod_err = '' if /ignore_depmod_err\s*=\s*(no|false|0)\s*$/ig;
@@ -130,13 +126,11 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
$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;
- $clobber_modules = "Yes" if /clobber_modules\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;
$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;
- $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;
$minimal_swap = 'Yes' if /minimal_swap\s*=\s*(yes|true|1)\s*$/ig;
$ignore_depmod_err = 'Yes' if /ignore_depmod_err\s*=\s*(yes|true|1)\s*$/ig;
diff --git a/linux-2.6/debian/templates/temp.image.plain/postrm b/linux-2.6/debian/templates/temp.image.plain/postrm
index d31f2ee..c44b17c 100755
--- a/linux-2.6/debian/templates/temp.image.plain/postrm
+++ b/linux-2.6/debian/templates/temp.image.plain/postrm
@@ -46,7 +46,6 @@ 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
-my $clobber_modules = ''; # target machine defined
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
@@ -92,7 +91,6 @@ my $realimageloc = "/$image_dir/";
my $have_conffile = "";
my $CONF_LOC = '/etc/kernel-img.conf';
my $relative_links = '';
-my $silent_modules = '';
my $silent_loader = '';

chdir('/') or die "could not chdir to /:$!\n";
@@ -113,12 +111,10 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
$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;
- $clobber_modules = '' if /clobber_modules\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;
$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;
$minimal_swap = '' if /minimal_swap\s*=\s*(no|false|0)\s*$/ig;
$ignore_depmod_err = '' if /ignore_depmod_err\s*=\s*(no|false|0)\s*$/ig;
@@ -130,12 +126,10 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
$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;
- $clobber_modules = "Yes" if /clobber_modules\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;
$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;
$minimal_swap = 'Yes' if /minimal_swap\s*=\s*(yes|true|1)\s*$/ig;
$ignore_depmod_err = 'Yes' if /ignore_depmod_err\s*=\s*(yes|true|1)\s*$/ig;
diff --git a/linux-2.6/debian/templates/temp.image.plain/preinst b/linux-2.6/debian/templates/temp.image.plain/preinst
index 9ca4822..0d642f5 100755
--- a/linux-2.6/debian/templates/temp.image.plain/preinst
+++ b/linux-2.6/debian/templates/temp.image.plain/preinst
@@ -32,7 +32,6 @@ 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 $clobber_modules = ''; # target machine defined
my $use_hard_links = ''; # hardlinks do not wirk across fs boundaries
my $postinst_hook = ''; #Normally we do not
my $postrm_hook = ''; #Normally we do not
@@ -65,7 +64,6 @@ my $realimageloc = "/$image_dir/";
my $have_conffile = "";
my $CONF_LOC = '/etc/kernel-img.conf';
my $relative_links = '';
-my $silent_modules = '';

my $modules_base = '/lib/modules';

@@ -74,11 +72,6 @@ die "Pre inst Internal error. Aborting." unless $version;
exit 0 if $ARGV[0] =~ /abort-upgrade/;
exit 1 unless $ARGV[0] =~ /(install|upgrade)/;

-# Official images may silently upgrade
-if ($official_image =~ /^\s*YES\s*$/o && ($ARGV[0] =~ /upgrade/)) {
- $silent_modules = 'Yes';
- }
-
# remove multiple leading slashes; make sure there is at least one.
$realimageloc =~ s|^/*|/|o;
$realimageloc =~ s|/+|/|o;
@@ -95,10 +88,8 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
$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;
- $clobber_modules = '' if /clobber_modules\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;
$minimal_swap = '' if /minimal_swap\s*=\s*(no|false|0)\s*$/ig;
$ignore_depmod_err = '' if /ignore_depmod_err\s*=\s*(no|false|0)\s*$/ig;
$relink_src_link = '' if /relink_src_link\s*=\s*(no|false|0)\s*$/ig;
@@ -110,10 +101,8 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
$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;
- $clobber_modules = "Yes" if /clobber_modules\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;
- $silent_modules = 'Yes' if /silent_modules\s*=\s*(yes|true|1)\s*$/ig;
$minimal_swap = 'Yes' if /minimal_swap\s*=\s*(yes|true|1)\s*$/ig;
$ignore_depmod_err = 'Yes' if /ignore_depmod_err\s*=\s*(yes|true|1)\s*$/ig;
$relink_src_link = 'Yes' if /relink_src_link\s*=\s*(yes|true|1)\s*$/ig;
@@ -234,8 +223,6 @@ if (-d "$modules_base/$version") {
warn "Info:\n$errors\n" if $errors;
}

-# If this is an official image, and only a build symlink exists, allow
-# it to be clobbered.
if ($official_image =~ /^\s*YES\s*$/o ) {
if (-d "$modules_base/$version" && -l "$modules_base/$version/build" ) {
rename("$modules_base/$version/build", "$modules_base/$version/build.save") ||
@@ -243,100 +230,6 @@ if ($official_image =~ /^\s*YES\s*$/o ) {
}
}

-if (-d "$modules_base/$version/kernel") {
- if ($clobber_modules) {
- my $ret =
- system("mv $modules_base/$version/kernel $modules_base/${version}_kernel_$$");
- my $seen;
- if ($ret) {
- my $note = "${package_name}/preinst/failed-to-move-modules-$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 = subst("$note", 'modules_base', "$modules_base");
- die "Error setting debconf substitutions in $note: $seen" if $ret;
-
- $ret = subst("$note", 'dest', "${version}/kernel_$$");
- die "Error setting debconf substitutions 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;
- }
- }
- elsif ($silent_modules !~ m/YES/i) {
- my $ret;
- my $seen;
- my $answer;
- my $question = "${package_name}/preinst/overwriting-modules-$version";
-
- ($ret,$seen) = fset ("$question", 'seen', 'false');
- die "Error setting debconf flags in $question: $seen" if $ret;
-
- $ret = subst("$question", 'modules_base', "$modules_base");
- die "Error setting debconf substitutions in $question: $seen" if $ret;
-
- $ret = subst("$question", 'package', "$package_name");
- die "Error setting debconf substitutions 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;
-
- $answer =~ s/^\s+//;
- $answer =~ s/\s+$//;
- print STDERR "Ok, aborting, since modules for this image already exist.\n"
- unless $answer =~ /^(f|n)/i;
- if ($answer !~ /^(f|n)/i && $invisible) {
- my $note = "${package_name}/preinst/abort-overwrite-$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;
- }
- else {
- print STDERR <<EOF;
-Updating directory $modules_base/$version.
-EOF
- ;
- }
-}
-
# set the env var stem
$ENV{'STEM'} = "=ST";

diff --git a/linux-2.6/debian/templates/temp.image.plain/prerm b/linux-2.6/debian/templates/temp.image.plain/prerm
index c6453ee..751f415 100755
--- a/linux-2.6/debian/templates/temp.image.plain/prerm
+++ b/linux-2.6/debian/templates/temp.image.plain/prerm
@@ -34,7 +34,6 @@ 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
-my $clobber_modules = ''; # target machine defined
my $use_hard_links = ''; # hardlinks do not wirk across fs boundaries
my $postinst_hook = ''; #Normally we do not
my $postrm_hook = ''; #Normally we do not
@@ -70,7 +69,6 @@ my $realimageloc = "/$image_dir/";
my $have_conffile = "";
my $CONF_LOC = '/etc/kernel-img.conf';
my $relative_links = '';
-my $silent_modules = '';
my $silent_loader = '';

# remove multiple leading slashes; make sure there is at least one.
@@ -113,12 +111,10 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
$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;
- $clobber_modules = '' if /clobber_modules\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;
$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;
$warn_reboot = '' if /warn_reboot\s*=\s*(no|false|0)\s*$/ig;
$minimal_swap = '' if /minimal_swap\s*=\s*(no|false|0)\s*$/ig;
@@ -132,12 +128,10 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
$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;
- $clobber_modules = "Yes" if /clobber_modules\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;
$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;
$warn_reboot = 'Yes' if /warn_reboot\s*=\s*(yes|true|1)\s*$/ig;
$minimal_swap = 'Yes' if /minimal_swap\s*=\s*(yes|true|1)\s*$/ig;
diff --git a/linux-2.6/debian/templates/temp.image.plain/templates b/linux-2.6/debian/templates/temp.image.plain/templates
index 8c75f45..99149f2 100644
--- a/linux-2.6/debian/templates/temp.image.plain/templates
+++ b/linux-2.6/debian/templates/temp.image.plain/templates
@@ -12,65 +12,6 @@ Description: Initial RAMdisk image generation impossible
.
${initrddep}

-Template: =ST-image-=V/preinst/failed-to-move-modules-=V
-Type: note
-Description: Modules removal failure
- You are attempting to install a kernel image (version =V).
- However, the directory ${modules_base}/=V/kernel still exists.
- .
- An attempt was made to move the directory. However, that
- action failed and ${modules_base}/=V could not be moved to
- ${modules_base}/${dest}.
- .
- You should move $modules_base/$version manually
- and try re-installing this image.
-
-Template: =ST-image-=V/preinst/overwriting-modules-=V
-Type: boolean
-Default: true
-Description: Abort installation since the kernel-image is already installed?
- You are attempting to install a kernel image (version =V).
- However, the directory ${modules_base}/=V/kernel still exists.
- .
- If this directory belongs to a previous ${package} package, and if
- you have deselected some modules, or installed standalone modules
- packages, this could have unexpected consequences.
- .
- If ${modules_base}/=V/kernel belongs to an old install of
- ${package}, you can now abort the
- installation of this kernel image (nothing has been changed yet).
- .
- It is recommended to abort the installation unless you are
- sure of what you are doing.
- .
- If you abort the installation, you should then move
- ${modules_base}/=V/kernel (for instance as
- ${modules_base}/=V.kernel.old) and then try
- re-installing this image.
-
-Template: =ST-image-=V/preinst/abort-overwrite-=V
-Type: note
-Description: Aborting installation since modules exist
- You are attempting to install an initrd kernel image (version
- =V).
- .
- However, the corresponding kernel modules directory exists,
- and there was no permission given to silently delete the modules
- directory.
- .
- As the question that's relevant for this situation
- was not shown, =ST-image-=V installation has been aborted.
-
-Template: =ST-image-=V/postinst/create-kimage-link-=V
-Type: boolean
-Default: true
-Description: Create a symbolic link to the current kernel image?
- There is no ${kimage} symbolic link.
- .
- Such a link can be created now and will be updated by subsequently
- installed image packages. This will be useful with some boot loaders
- such as LILO.
-
Template: =ST-image-=V/postinst/depmod-error-initrd-=V
Type: boolean
Default: false


--
To UNSUBSCRIBE, email to debian-kernel-REQUEST.DeleteThis@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.DeleteThis@lists.debian.org
Back to top
maximilian attems
External


Since: Feb 19, 2007
Posts: 201



PostPosted: Sat Jul 25, 2009 11:10 am    Post subject: Re: piupart failure on preinst [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

nuke the possibility of moving the image in postinst
from /boot to /.

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


diff --git a/linux-2.6/debian/templates/temp.image.plain/config b/linux-2.6/debian/templates/temp.image.plain/config
index 79607bb..1b601ca 100755
--- a/linux-2.6/debian/templates/temp.image.plain/config
+++ b/linux-2.6/debian/templates/temp.image.plain/config
@@ -25,7 +25,6 @@ my $link_in_boot = "=IB"; # Should be empty, mostly
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 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
$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 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
$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;
diff --git a/linux-2.6/debian/templates/temp.image.plain/postinst b/linux-2.6/debian/templates/temp.image.plain/postinst
index ceb0b48..67814d4 100755
--- a/linux-2.6/debian/templates/temp.image.plain/postinst
+++ b/linux-2.6/debian/templates/temp.image.plain/postinst
@@ -32,7 +32,6 @@ my $reverse_symlink = "=R"; # Should be empty, mostly
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 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
$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 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
$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 @@ sub spath {
}
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 @@ sub image_magic {
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);
diff --git a/linux-2.6/debian/templates/temp.image.plain/postrm b/linux-2.6/debian/templates/temp.image.plain/postrm
index c44b17c..18808ac 100755
--- a/linux-2.6/debian/templates/temp.image.plain/postrm
+++ b/linux-2.6/debian/templates/temp.image.plain/postrm
@@ -42,7 +42,6 @@ my $reverse_symlink = "=R"; # Should be empty, mostly
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 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
$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 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
$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;
diff --git a/linux-2.6/debian/templates/temp.image.plain/preinst b/linux-2.6/debian/templates/temp.image.plain/preinst
index 0d642f5..7211bde 100755
--- a/linux-2.6/debian/templates/temp.image.plain/preinst
+++ b/linux-2.6/debian/templates/temp.image.plain/preinst
@@ -29,7 +29,6 @@ my $link_in_boot = "=IB"; # Should be empty, mostly
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 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
$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 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
$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;
diff --git a/linux-2.6/debian/templates/temp.image.plain/prerm b/linux-2.6/debian/templates/temp.image.plain/prerm
index 751f415..8b1a6d7 100755
--- a/linux-2.6/debian/templates/temp.image.plain/prerm
+++ b/linux-2.6/debian/templates/temp.image.plain/prerm
@@ -30,7 +30,6 @@ my $reverse_symlink = "=R"; # Should be empty, mostly
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 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
$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 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
$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;


--
To UNSUBSCRIBE, email to debian-kernel-REQUEST.TakeThisOut@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.TakeThisOut@lists.debian.org
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Kernel All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum