I wrote: > This code and the file /etc/kernel-img.conf are vestiges of > kernel-package which are gradually being removed from the official > kernel packages. Therefore I don't think we should reinstate this idea > of the default loader but we should change the code so that it doesn't > silently fail if do_loader is set and loader is not.
How does this change look? Ben. --- linux-2.6/debian/templates/temp.image.plain/postinst (revision 15874) +++ linux-2.6/debian/templates/temp.image.plain/postinst (working copy) @@ -1180,25 +1180,32 @@ LOADER: { last unless $do_boot_enable; # Exit if explicitly asked to - last if $loader =~ /silo/i; # SILO does not have to be executed. - last if $loader =~ /yaboot/i; # yaboot does not have to be executed. - last if $loader =~ /milo/i; # MILO does not have to be executed. - last if $loader =~ /nettrom/i; # NETTROM does not have to be executed. - last if $loader =~ /arcboot/i; # ARCBOOT does not have to be executed. - last if $loader =~ /delo/i; # DELO does not have to be executed. - if ($official_image =~ /^\s*YES\s*$/o) { - last if $loader =~ /quik/i; # maintainer asked quik invocation to be ignored + if (!$explicit_do_loader) { + last if $loader =~ /silo/i; # SILO does not have to be executed. + last if $loader =~ /yaboot/i; # yaboot does not have to be executed. + last if $loader =~ /milo/i; # MILO does not have to be executed. + last if $loader =~ /nettrom/i; # NETTROM does not have to be executed. + last if $loader =~ /arcboot/i; # ARCBOOT does not have to be executed. + last if $loader =~ /delo/i; # DELO does not have to be executed. + if ($official_image =~ /^\s*YES\s*$/o) { + last if $loader =~ /quik/i; # maintainer asked quik invocation to be ignored + } } - last unless $loaderloc; - last unless -x $loaderloc; last unless $do_bootloader; - if (-T "/etc/$loader.conf") { + if ($loaderloc && -x $loaderloc && -T "/etc/$loader.conf") { # Trust and use the existing lilo.conf. print STDERR "You already have a $Loader configuration in /etc/$loader.conf\n"; my $ret = &run_lilo(); exit $ret if $ret; + } else { + if ($loader) { + print STDERR "$Loader was not found and has not been updated\n"; + } else if ($explicit_do_loader || !$postinst_hook) { + print STDERR "No bootloader has been configured in /etc/kernel-img.conf\n" + . "The bootloader may need to be updated manually\n"; + } } } --- END --- -- Ben Hutchings Once a job is fouled up, anything done to improve it makes it worse.
signature.asc
Description: This is a digitally signed message part