[kernel] r17571 - dists/trunk/linux-2.6/debian/templates/temp.image.plain
Ben Hutchings
benh at alioth.debian.org
Wed Jun 1 10:03:08 UTC 2011
Author: benh
Date: Wed Jun 1 10:03:07 2011
New Revision: 17571
Log:
Fix version comparison in precondition for firmware file check
Modified:
dists/trunk/linux-2.6/debian/templates/temp.image.plain/postinst
Modified: dists/trunk/linux-2.6/debian/templates/temp.image.plain/postinst
==============================================================================
--- dists/trunk/linux-2.6/debian/templates/temp.image.plain/postinst Wed Jun 1 09:50:31 2011 (r17570)
+++ dists/trunk/linux-2.6/debian/templates/temp.image.plain/postinst Wed Jun 1 10:03:07 2011 (r17571)
@@ -620,13 +620,16 @@
# for some other device, leading us to claim a dependency wrongly
if (!defined($ARGV[1]) || $ARGV[1] eq '') {
+ sub version_code {
+ my $version = shift;
+ $version =~ s/^2\.(\d+)\.(\d+).*/2*65536 + $1*256 + $2/e
+ or $version =~ s/^(\d+)\.(\d+).*/$1*65536 + $2*256/e
+ or $version = 0;
+ return $version;
+ }
(undef, undef, my $running_version) = POSIX::uname();
- my $running_patchlevel = $running_version;
- $running_patchlevel =~ s/^2\.6\.(\d+).*/$1/;
- my $new_patchlevel = $version;
- $new_patchlevel =~ s/^2\.6\.(\d+).*/$1/;
- if ($new_patchlevel > $running_patchlevel) {
+ if (version_code($new_version) > version_code($running_version)) {
my $missing = '';
my %module_paths;
open(DEP, "<$modules_base/$version/modules.dep") or return;
More information about the Kernel-svn-changes
mailing list