r4632 - in dists/trunk/utils/kernel-package: debian kernel
Sven Luther
luther at costa.debian.org
Mon Oct 24 08:49:41 UTC 2005
Author: luther
Date: 2005-10-24 08:49:40 +0000 (Mon, 24 Oct 2005)
New Revision: 4632
Modified:
dists/trunk/utils/kernel-package/debian/changelog
dists/trunk/utils/kernel-package/kernel/image.preinst
Log:
Fixed email address in changelog
added new code to preinst also.
Modified: dists/trunk/utils/kernel-package/debian/changelog
===================================================================
--- dists/trunk/utils/kernel-package/debian/changelog 2005-10-24 08:42:06 UTC (rev 4631)
+++ dists/trunk/utils/kernel-package/debian/changelog 2005-10-24 08:49:40 UTC (rev 4632)
@@ -3,7 +3,7 @@
* ramdisk generation tools now return 2 on --supported-* negative, so we can
now add overrides for non- --supported-* supporting tools.
- -- Sven Luther <sven at localhost.localdomain> Mon, 24 Oct 2005 10:34:46 +0200
+ -- Sven Luther <luther at debian.org> Mon, 24 Oct 2005 10:34:46 +0200
kernel-package (9.008.2) unstable; urgency=low
Modified: dists/trunk/utils/kernel-package/kernel/image.preinst
===================================================================
--- dists/trunk/utils/kernel-package/kernel/image.preinst 2005-10-24 08:42:06 UTC (rev 4631)
+++ dists/trunk/utils/kernel-package/kernel/image.preinst 2005-10-24 08:49:40 UTC (rev 4632)
@@ -182,38 +182,25 @@
if ($initrd) {
chomp (my $hostversion = `uname -r`);
- my @ramdisklist = split (/ /, $ramdisk);
- if (@ramdisklist == 1) {
- if (!( -x $ramdisk)) {
- die ("Failed to create initrd, $ramdisk does not exist or is not executable\n");
+ my @ramdisklist =
+ grep {
+ my $ret = system ("$_ --supported-host-version=$hostversion --supported-target-version=$version 1>/dev/null 2>&1");
+ -x and (
+ $ret == 0 or (
+ $ret == 1 and (
+ (($ramdisk eq "/usr/sbin/mkinitrd") and
+ (system ("dpkg", "--compare-versions", "$version", "lt", "2.6.13") == 0)) or
+ (($ramdisk eq "/usr/sbin/mkinitramfs") and
+ (system ("dpkg", "--compare-versions", "$version", "lt", "2.6.12") == 1)) or
+ (($ramdisk eq "/usr/sbin/mkinitrd.yaird") and
+ (system ("dpkg", "--compare-versions", "$version", "lt", "2.6.8") == 1) and
+ (system ("dpkg", "--compare-versions", "$hostversion", "lt", "2.6.8") == 1))
+ )
+ )
+ )
}
- if (system ("$ramdisk --supported-host-version=$hostversion --supported-target-version=$version 1>/dev/null 2>&1") != 0) {
- if (($ramdisk eq "/usr/sbin/mkinitrd") &&
- (system ("dpkg", "--compare-versions", "$version", "lt", "2.6.13") == 1)) {
- die ("Failed, initrd-tools cannot create ramdisks for kernel version greater than 2.6.12\n");
- }
- if (($ramdisk eq "/usr/sbin/mkinitrd") &&
- (system ("dpkg", "--compare-versions", "$version", "lt", "2.6.12") == 0)) {
- die ("Failed, initramfs-tools cannot create ramdisks for kernel version prior to 2.6.12\n");
- }
- if (($ramdisk eq "/usr/sbin/mkinitrd.yaird") &&
- (system ("dpkg", "--compare-versions", "$version", "lt", "2.6.8") == 0) &&
- (system ("dpkg", "--compare-versions", "$hostversion", "lt", "2.6.8") == 0)) {
- die ("Failed, yaird cannot create ramdisks for kernel version lesser than 2.6.8 or running on kernels older than 2.6.8\n");
- }
- }
- } else {
- my @ramdisklist =
- grep {
- -x and
- system ("$_ --supported-host-version=$hostversion --supported-target-version=$version 1>/dev/null 2>&1") == 0
- }
- (split (/ /, $ramdisk));
+ (split (/ /, $ramdisk));
- my $ramdiskorig = $ramdisk;
- $ramdisk = shift @ramdisklist;
- }
-
if (! -e $ramdisk) {
print STDERR <<EOERROR;
More information about the Kernel-svn-changes
mailing list