[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [kernel] r17571 - dists/trunk/linux-2.6/debian/templates/temp.image.plain



Hi

On Wed, Jun 01, 2011 at 10:03:07 +0000, Ben Hutchings wrote:
> 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)) {

Isn't $new_version undefined and should be replaced by $version?

>        my $missing = '';
>        my %module_paths;
>        open(DEP, "<$modules_base/$version/modules.dep") or return;

Regards
	Stefan Lippers-Hollmann


Reply to: