[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



On Wed, Jun 01, 2011 at 09:54:54PM +0200, Stefan Lippers-Hollmann wrote:
> 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?
[...]

Yeah, well spotted...

Unfortunately it takes so much time to do a package build with new
maintainer scripts that I tend to test the new code by pasting into
a new file.  But in that case I'm using @ARGV and not the real
variable references.

Ben.

-- 
Ben Hutchings
We get into the habit of living before acquiring the habit of thinking.
                                                              - Albert Camus


Reply to: