[Osgeo4w-trac] Re: [osgeo4w] #156: osgeo4w-regen.sh should test for standardized package name

OSGeo4W trac_osgeo4w at osgeo.org
Tue Mar 9 15:47:22 EST 2010


#156: osgeo4w-regen.sh should test for standardized package name
----------------------+-----------------------------------------------------
Reporter:  warmerdam  |        Owner:  hobu   
    Type:  defect     |       Status:  new    
Priority:  major      |    Component:  Package
 Version:             |   Resolution:         
Keywords:  liblas     |  
----------------------+-----------------------------------------------------
Comment (by maphew):

 peering through the black haze, in genini I *think* `sub getver` is
 incomplete, in that it captures the application version number but not the
 package version
 {{{
 #!perl
 sub getver {
     my $f = basename($_[0]);
     my @a = ($f =~ /^(.*?)-(\d.*)\.tar/);
     return wantarray ? @a : $a[1];
 }
 }}}

 more like:
 {{{
 #!perl
 sub getver {
     my $f = basename($_[0]);
     my @a = ($f =~ /^(.*?)-(\d.*)-(\d.*)\.tar/);
     return wantarray ? @a : $a[1],$a[2];
 }
 }}}

 explanation: there's a second `-(\d.*)` to capture the trailing `-N`. The
 return wantarray is pseudo code as I've just guessed at the syntax. To be
 truly useful whatever's calling getver needs to do something if `$a[2]` is
 empty.

-- 
Ticket URL: <http://trac.osgeo.org/osgeo4w/ticket/156#comment:4>
OSGeo4W <http://trac.osgeo.org/osgeo4w>
OSGeo4W is the Windows installer for the OSGeo stack.


More information about the Osgeo4w-trac mailing list