[postgis-tickets] [PostGIS] #2628: loader_generate_script output is buggy

PostGIS trac at osgeo.org
Fri Jan 31 13:05:17 PST 2014


#2628: loader_generate_script output is buggy
----------------------------+-----------------------------------------------
 Reporter:  beland          |       Owner:  robe         
     Type:  defect          |      Status:  new          
 Priority:  medium          |   Milestone:  PostGIS 2.1.2
Component:  tiger geocoder  |     Version:  2.1.x        
 Keywords:                  |  
----------------------------+-----------------------------------------------

Comment(by beland):

 Actually, I think what I uploaded was derived from the wrong function;
 I'll fix that shortly.

 The first item that is not respected properly is:

 TMPDIR="/gisdata/temp/"

 At the end of the first section there is:

 cd /gisdata

 The problem is that if you change TMPDIR, to say
 /home/beland/gisdata/temp, because /gisdata doesn't exist, the hard-coded
 references still point to /gisdata.

 So what the script needs is something like $DOWNLOADDIR, and to define
 $TMPDIR=$DOWNLOADDIR/tmp.  Or, change the meaning of TMPDIR to be what I
 call DOWNLOADDIR.


 The second group of non-respected config variables are PGPORT, PGHOST,
 PGUSER, PGPASSWORD, and PGDATABASE.  These are all defined but never used
 in the script.

 I'm using local sockets, for example, so I don't actually want to have a
 PGHOST, so it made sense to me to just let the user define their own $PSQL
 command-line arguments.  Or you could keep the PGXXXX variables and
 actually use them in the definition of $PSQL.


 As for the non-existent files, there are often two "for" lines right next
 to each other, like:

 for z in tl_*_25*_place.zip ; do $UNZIPTOOL -o -d $TMPDIR $z; done
 for z in */tl_*_25*_place.zip ; do $UNZIPTOOL -o -d $TMPDIR $z; done

 The second pattern, */tl_*_25*_place.zip, does not match anything
 downloaded by the wget.  There are */ variants in each of these pairs, and
 so far it seems they always produce an error.  When cleaning up these
 scripts here, we just deleted the second lines and we still got the
 geocoding system to work, so I guess they aren't necessary.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2628#comment:3>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list