[osgeo4w-dev] genini fix

Jürgen E. Fischer jef at norbit.de
Mon Aug 3 01:01:51 EDT 2009


Hi,

I notices that the qgis nightly builds weren't picked up for the setup.ini.
This was due to the package version not being compared lexically, but not
numerically.

I applied following fix:

--- genini      2008-03-15 06:08:42.000000000 -0800
+++ /home/jef/genini    2009-08-02 21:45:03.000000000 -0700
@@ -170,7 +170,20 @@
     }

     return if $explicit;
-    my @files = sort grep{!/-src\.tar.bz2/} glob("$d/*.tar.bz2");
+    my @files = sort {
+                        my($an,$av,$ap) = ($a =~ /(.*)-([^-]+)-(\d+).tar.bz2$/);
+                        my($bn,$bv,$bp) = ($b =~ /(.*)-([^-]+)-(\d+).tar.bz2$/);
+
+                        if( defined $ap && defined $bp ) {
+                                return ($an ne $bn) ?
+                                        $an cmp $bn :
+                                        $av ne $bv ?
+                                                $av cmp $bv :
+                                                $ap <=> $bp;
+                        } else {
+                                return $a cmp $b;
+                        }
+                } grep { !/-src\.tar.bz2/ } glob("$d/*.tar.bz2");
     if (!@files) {
         myerror "not enough package files in $d";
         return;


That also explains why I couldn't use the revision number as package number
earlier.  Any opinions on switching to that now?


Jürgen

-- 
Jürgen E. Fischer         norBIT GmbH               Tel. +49-4931-918175-20
Dipl.-Inf. (FH)           Rheinstraße 13            Fax. +49-4931-918175-50
Software Engineer         D-26506 Norden               http://www.norbit.de

-- 
norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502



More information about the osgeo4w-dev mailing list