Opened 10 years ago

Closed 2 years ago

#1857 closed defect (fixed)

mapnik-osm-updater.sh looks in the wrong place on Fedora 10/x86_64 for lwpostgis.sql

Reported by: brwk Owned by: jburgess777@…
Priority: minor Milestone:
Component: osm2pgsql Version:
Keywords: Cc:

Description

When you install mapnik using the Fedora 10 packages for postgis, the mapnik-osm-updater.sh cannot find lwpostgis.sql because it's not looking in the correct place. The following diff adds the Fedora 10 / x86_64 location of this file to the list of those places checked. It should be mostly harmless on other platforms:

Index: mapnik-osm-updater.sh =================================================================== --- mapnik-osm-updater.sh (revision 15204) +++ mapnik-osm-updater.sh (working copy) @@ -496,6 +496,7 @@

lwpostgis="/usr/share/postgresql-8.4-postgis/lwpostgis.sql"

test -s $lwpostgis test -s $lwpostgis
lwpostgis="/usr/share/postgresql-8.3-postgis/lwpostgis.sql"
lwpostgis="/usr/share/postgresql-8.2-postgis/lwpostgis.sql"

+ test -s $lwpostgis lwpostgis="/usr/share/pgsql/contrib/lwpostgis-64.sql"

test -s $lwpostgis
lwpostgis="ls /usr/share/postgresql-*-postgis/lwpostgis.sql| sort -n | head 1"

if [ ! -s $lwpostgis ] ; then

echo "!!!!!! ERROR: Cannot find $lwpostgis"

Attachments (1)

napnik.patch (1.3 KB) - added by brwk 10 years ago.
patch for mapnik utility script.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 10 years ago by brwk

it has the same problem with spatial_ref_sys.sql.

Attached a proper patch that should fix both of them. Might need to check for a -32 as well as the -64 on the first one.

Changed 10 years ago by brwk

Attachment: napnik.patch added

patch for mapnik utility script.

comment:2 Changed 10 years ago by brwk

OK, the script is also having a problem with finding the default.style and 900913.sql files when invoked with ./mapnik-osm-updater.sh. It seems to be trying the right things but simply failing (ie dirname $0).

Not so sure about what to do about that....

comment:3 Changed 10 years ago by Tom Hughes

Priority: majorminor

This stuff is very distribution and architecture specific so I'm sure it's reasonable for us to try and consider every possible path - maybe we should treat the script more as a template or provide some way for the user to tell it where their postgis installation scripts are?

comment:4 Changed 10 years ago by steve8@…

Owner: changed from steve8@… to Tom Hughes

comment:5 Changed 10 years ago by Tom Hughes

Owner: changed from Tom Hughes to mapnik-team@…

comment:6 Changed 8 years ago by Ldp

Owner: changed from mapnik-team@… to jburgess777@…
Status: newassigned

comment:7 Changed 5 years ago by Andy Allan

Component: mapnikosm2pgsql

Script is (still!) part of osm2pgsql

comment:8 Changed 2 years ago by pnorman

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.